std::__throw_bad_alloc();
}
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
std::align_val_t __al = std::align_val_t(alignof(_Tp));
# define _GLIBCXX_SIZED_DEALLOC(p, n) (p)
#endif
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
_GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n),
if (__builtin_expect(size_t(__len) > (size_t(-1) / sizeof(_Tp)), 0))
return 0;
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
return (_Tp*) _GLIBCXX_OPERATOR_NEW(__len * sizeof(_Tp),
align_val_t(alignof(_Tp)),
# define _GLIBCXX_SIZED_DEALLOC(T, p, n) (p)
#endif
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
_GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(_Tp, __p, __len),
inline void
return_temporary_buffer(_Tp* __p)
{
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
_GLIBCXX_OPERATOR_DELETE(__p, align_val_t(alignof(_Tp)));
else
if (__n > this->max_size())
std::__throw_bad_alloc();
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(value_type) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
const size_type __b = __n * sizeof(value_type);
{
if (__builtin_expect(__p != 0, true))
{
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
// Types with extended alignment are handled by operator delete.
if (alignof(value_type) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
}
_Tp* __ret = 0;
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
#if __cplusplus > 201402L && _GLIBCXX_HAVE_ALIGNED_ALLOC
if (alignof(_Tp) > alignof(std::max_align_t))
{
if (__n > this->max_size())
std::__throw_bad_alloc();
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
// Types with extended alignment are handled by operator new/delete.
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
{
if (__builtin_expect(__p != 0, true))
{
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
// Types with extended alignment are handled by operator new/delete.
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
const size_t __bytes = __n * sizeof(_Tp);
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
std::align_val_t __al = std::align_val_t(alignof(_Tp));
using std::size_t;
if (__builtin_expect(__n != 0 && __p != 0, true))
{
-#if __cpp_aligned_new
+#if __cpp_aligned_new && __cplusplus >= 201103L
if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
{
::operator delete(__p, std::align_val_t(alignof(_Tp)));
--- /dev/null
+// { dg-options "-std=gnu++98 -faligned-new" }
+// { dg-do compile }
+#include <ext/memory>
+#include <ext/bitmap_allocator.h>
+#include <ext/mt_allocator.h>
+#include <ext/malloc_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/pool_allocator.h>