diff options
Diffstat (limited to 'libstdc++-v3/include/ext/aligned_buffer.h')
-rw-r--r-- | libstdc++-v3/include/ext/aligned_buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libstdc++-v3/include/ext/aligned_buffer.h b/libstdc++-v3/include/ext/aligned_buffer.h index 94a2ff0e67a..81fb797723c 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 |