[SG10] Over-aligned dynamic allocation
Daniel Krügler
daniel.kruegler at gmail.com
Wed Jun 22 07:07:06 CEST 2016
2016-06-22 6:04 GMT+02:00 Nelson, Clark <clark.nelson at intel.com>:
>> I can imagine that the macro would also be used by people who
>> replace the global operator new, and who would also replace the
>> aligned version if it were present.
>
> That's a good point. It would also serve to indicate whether
> "std::align_val_t" were available as a type name.
>
> Would anyone else like to weigh in in one direction or the other?
I gave this a second thought after your presentation in LWG and then
it occurred to me that indeed the feature macro could be indeed
useful. The usecases that came into my mind do not belong to the very
narrow scoped cases, but to a wider-scoped situation where the
programmer might want to decide to either user over-aligned allocation
of some struct or to follow a completely different approach of solving
your programming problem in a way. But I was not able to construct a
reasonably looking example for this, sorry :-(
- Daniel
More information about the Features
mailing list