diff options
| -rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/aligned_buffer.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0305de1..a0bee0e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2018-02-20 François Dumont <fdumont@gcc.gnu.org> + + * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION] + (template<> __aligned_buffer): Define as __aligned_membuf alias. + 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com> PR target/84148 diff --git a/libstdc++-v3/include/ext/aligned_buffer.h b/libstdc++-v3/include/ext/aligned_buffer.h index 94a2ff0..81fb797 100644 --- a/libstdc++-v3/include/ext/aligned_buffer.h +++ b/libstdc++-v3/include/ext/aligned_buffer.h @@ -75,6 +75,10 @@ namespace __gnu_cxx { return static_cast<const _Tp*>(_M_addr()); } }; +#if _GLIBCXX_INLINE_VERSION + template<typename _Tp> + using __aligned_buffer = __aligned_membuf<_Tp>; +#else // Similar to __aligned_membuf but aligned for complete objects, not members. // This type is used in <forward_list>, <future>, <bits/shared_ptr_base.h> // and <bits/hashtable_policy.h>, but ideally they would use __aligned_membuf @@ -113,6 +117,7 @@ namespace __gnu_cxx _M_ptr() const noexcept { return static_cast<const _Tp*>(_M_addr()); } }; +#endif } // namespace |
