@@ -283,35 +283,24 @@ class MemoryAllocator {
283
283
/* *
284
284
* The recommended alternative for statement expression-incompatible compilers
285
285
* is to directly allocate the memory.
286
- * e.g. memory_allocator__->allocate(nbytes__);
287
286
*/
288
287
#define ET_TRY_ALLOCATE_OR (memory_allocator__, nbytes__, ...) \
289
- static_assert ( \
290
- false , \
291
- " ET_TRY_ALLOCATE_OR uses statement expressions and \
292
- thus is not available for use with this compiler." );
288
+ memory_allocator__->allocate (nbytes__);
293
289
294
290
/* *
295
291
* The recommended alternative for statement expression-incompatible compilers
296
292
* is to directly allocate the memory.
297
- * e.g. memory_allocator__->allocateInstance<type__>();
298
293
*/
299
294
#define ET_TRY_ALLOCATE_INSTANCE_OR (memory_allocator__, type__, ...) \
300
- static_assert ( \
301
- false , \
302
- " ET_TRY_ALLOCATE_INSTANCE_OR uses statement \
303
- expressions and thus is not available for use with this compiler." );
295
+ memory_allocator__->allocateInstance<type__>();
304
296
305
297
/* *
306
298
* The recommended alternative for statement expression-incompatible compilers
307
299
* is to directly use allocate the memory.
308
- * e.g. memory_allocator__->allocateList<type__>(nelem__);
309
300
*/
310
301
#define ET_TRY_ALLOCATE_LIST_OR (memory_allocator__, type__, nelem__, ...) \
311
- static_assert ( \
312
- false , \
313
- " ET_TRY_ALLOCATE_LIST_OR uses statement \
314
- expressions and thus is not available for use with this compiler." );
302
+ memory_allocator__->allocateList<type__>(nelem__);
303
+
315
304
#endif // !ET_HAVE_GNU_STATEMENT_EXPRESSIONS
316
305
317
306
/* *
0 commit comments