diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-11-14 03:44:56 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-11-14 03:44:56 +0000 |
commit | 3ce968519a2b871e3d396dd785359c47218dba1a (patch) | |
tree | efcd36288acf36ae6d394b93b8d3aa9ebb80394a /libstdc++-v3/include | |
parent | 9c52cc0189659e70155ab6ace4dc498bbf9d2142 (diff) | |
download | gcc-3ce968519a2b871e3d396dd785359c47218dba1a.tar.gz |
Delete addressof for temporaries (LWG 2598)
* include/bits/move.h (addressof(const _Tp&&)): Add deleted overload,
as per LWG 2598.
From-SVN: r242375
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/move.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index a5002fca422..d0aefe76cf0 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -137,6 +137,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION addressof(_Tp& __r) noexcept { return std::__addressof(__r); } + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 2598. addressof works on temporaries + template<typename _Tp> + const _Tp* addressof(const _Tp&&) = delete; + // C++11 version of std::exchange for internal use. template <typename _Tp, typename _Up = _Tp> inline _Tp |