variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator...
authorMikhail Strelnikov <mikhail.strelnikov@gmail.com>
Mon, 5 Sep 2016 19:40:44 +0000 (19:40 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Mon, 5 Sep 2016 19:40:44 +0000 (19:40 +0000)
2016-09-05  Mikhail Strelnikov  <mikhail.strelnikov@gmail.com>

* include/std/variant (_Variant_storage::_M_storage()): Use std::addressof
instead of operator& to take address.

From-SVN: r239996

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/variant

index a82da55a6c6c6f35d6a1e553975afb9a0765a123..b89330bdfddb881e01e019017322e7c6972d803c 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-05  Mikhail Strelnikov  <mikhail.strelnikov@gmail.com>
+
+       * include/std/variant (_Variant_storage::_M_storage()): Use std::addressof
+       instead of operator& to take address.
+
 2016-09-02  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
 
        * acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Check for presence of
index a9b4394477091d225455e9004567d7126d852091..be254382e2c9b14b58d3ac0cdaec1e67fee7c4ae 100644 (file)
@@ -312,7 +312,7 @@ namespace __variant
       _M_storage() const
       {
        return const_cast<void*>(
-         static_cast<const void*>(&_M_first._M_storage));
+         static_cast<const void*>(std::addressof(_M_first._M_storage)));
       }
 
       union