[PATCH] PR libstdc++/86846 Alternative to pointer-width atomics

2018-08-14 Thread Jonathan Wakely
Define a class using std::mutex for when std::atomic cannot be used to implement the default memory resource. When std::mutex constructor is not constexpr the constant_init trick won't work, so just define a global and use init_priority for it. The compiler warns about using reserved priority, so

Re: [PATCH] PR libstdc++/86846 Alternative to pointer-width atomics

2018-08-15 Thread Szabolcs Nagy
On 14/08/18 14:13, Jonathan Wakely wrote: Define a class using std::mutex for when std::atomic cannot be used to implement the default memory resource. When std::mutex constructor is not constexpr the constant_init trick won't work, so just define a global and use init_priority for it. The compi

Re: [PATCH] PR libstdc++/86846 Alternative to pointer-width atomics

2018-08-15 Thread Jonathan Wakely
On 15/08/18 10:40 +0100, Szabolcs Nagy wrote: On 14/08/18 14:13, Jonathan Wakely wrote: Define a class using std::mutex for when std::atomic cannot be used to implement the default memory resource. When std::mutex constructor is not constexpr the constant_init trick won't work, so just define a