From: Mikhail Strelnikov Date: Mon, 5 Sep 2016 19:40:44 +0000 (+0000) Subject: variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eddca7bd73bcd4a322282d3170beea0c047ee0fb;p=gcc.git variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator& to take address. 2016-09-05 Mikhail Strelnikov * include/std/variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator& to take address. From-SVN: r239996 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a82da55a6c6..b89330bdfdd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-09-05 Mikhail Strelnikov + + * include/std/variant (_Variant_storage::_M_storage()): Use std::addressof + instead of operator& to take address. + 2016-09-02 Maxim Kuvyrkov * acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Check for presence of diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index a9b43944770..be254382e2c 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -312,7 +312,7 @@ namespace __variant _M_storage() const { return const_cast( - static_cast(&_M_first._M_storage)); + static_cast(std::addressof(_M_first._M_storage))); } union