In this patch:
- Reduced the net of dependencies when platform semaphores are disabled.
- Respect the signed range of ptrdiff_t in tests.
- Construct the aligned member for the barrier algorithm properly.
Testing on this code is pretty light at this stage.
Couldn't we use the aligned versions of operator new and delete here? I believe we could then get rid of the __state_t* __state pointer?
I was going to suggest some complicated solution that does explicit calls to operator new[](size_t, align_val_t), however after thinking about it harder I think simply compiling as C++17 would solve the problem, since the array would then be aligned properly.
@EricWF WDYT about building with C++17 enabled?