@@ -283,35 +283,24 @@ class MemoryAllocator {
283283/* *
284284 * The recommended alternative for statement expression-incompatible compilers
285285 * is to directly allocate the memory.
286- * e.g. memory_allocator__->allocate(nbytes__);
287286 */
288287#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__);
293289
294290/* *
295291 * The recommended alternative for statement expression-incompatible compilers
296292 * is to directly allocate the memory.
297- * e.g. memory_allocator__->allocateInstance<type__>();
298293 */
299294#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__>();
304296
305297/* *
306298 * The recommended alternative for statement expression-incompatible compilers
307299 * is to directly use allocate the memory.
308- * e.g. memory_allocator__->allocateList<type__>(nelem__);
309300 */
310301#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+
315304#endif // !ET_HAVE_GNU_STATEMENT_EXPRESSIONS
316305
317306/* *
0 commit comments