Changed: call throw_exception() function instead of ordinary throw
[libcds.git] / cds / os / alloc_aligned.h
index 1b5ef3ea20be1b8359b35a79d57e41b733350fab..1dd06d76f842587bb0562c632f1a8ff2dfd7e2fb 100644 (file)
@@ -54,6 +54,7 @@
 #include <memory>
 #include <cds/details/is_aligned.h>
 #include <cds/algo/int_algo.h>
+#include <cds/details/throw_exception.h>
 
 namespace cds {
     /// OS specific wrappers
@@ -177,7 +178,7 @@ namespace cds {
                 assert( cds::beans::is_power2( nAlign ));
                 pointer p = reinterpret_cast<T *>( cds::OS::aligned_malloc( sizeof(T) * nCount, nAlign ));
                 if ( !p )
-                    throw std::bad_alloc();
+                    CDS_THROW_EXCEPTION( std::bad_alloc() );
                 assert( cds::details::is_aligned( p, nAlign ));
                 return p;
             }