boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
101 stars 113 forks source link

Remove deprecated unnecessary ATOMIC_VAR_INIT #227

Closed ecatmur closed 1 year ago

ecatmur commented 2 years ago

ATOMIC_VAR_INIT has always been unnecessary (it does the same as the converting ctor of std::atomic) and is deprecated in C++20.

This causes build failure for clang/libc++/Wall.

Use direct-initialization syntax so that it works in pre-C++17 (?) mode

ref. #211

ecatmur commented 2 years ago

I can't see why the Windows 2022 gcc-11 CI build is failing, the logs don't appear to show anything useful.

edit: it has been pointed out to me that the -1073741511 appearing in the logs is 0xC0000139 which indicates a problem loading DLLs, so probably not caused by this change.

igaztanaga commented 1 year ago

Thanks for the report! The fix for #232 partially solved the issue plus I added direct initialization as you suggested in commit https://github.com/boostorg/container/commit/e9b09a5ee7211091d8e7398471eb6265fc452e1e.