Can't find std::shared_mutex
-
wrote on 17 Apr 2020, 07:28 last edited by kitfox
std::shared_mutex
was added with the c++ 17 standard, but it does not seem to be available when I#include <shared_mutex>
. I've configured my .pro file to useCONFIG += c++20
, but the standard library appears to only be from c++ 14. How would I be able to link against a later standard library? -
std::shared_mutex
was added with the c++ 17 standard, but it does not seem to be available when I#include <shared_mutex>
. I've configured my .pro file to useCONFIG += c++20
, but the standard library appears to only be from c++ 14. How would I be able to link against a later standard library?wrote on 17 Apr 2020, 08:20 last edited by@kitfox I think you have to change
CONFIG += c++20
toCONFIG += c++17
, AFAIK CONFIG += c++20 do not exist ==> https://doc.qt.io/qt-5/qmake-variable-reference.html#configOr maybe use
CONFIG += c++latest
-
std::shared_mutex
was added with the c++ 17 standard, but it does not seem to be available when I#include <shared_mutex>
. I've configured my .pro file to useCONFIG += c++20
, but the standard library appears to only be from c++ 14. How would I be able to link against a later standard library?@kitfox You forgot to mention the compiler (including exact version) you're using.
-
wrote on 17 Apr 2020, 07:46 last edited by kitfox
-
-
wrote on 17 Apr 2020, 08:08 last edited by kitfox
-
std::shared_mutex
was added with the c++ 17 standard, but it does not seem to be available when I#include <shared_mutex>
. I've configured my .pro file to useCONFIG += c++20
, but the standard library appears to only be from c++ 14. How would I be able to link against a later standard library?wrote on 17 Apr 2020, 08:20 last edited by@kitfox I think you have to change
CONFIG += c++20
toCONFIG += c++17
, AFAIK CONFIG += c++20 do not exist ==> https://doc.qt.io/qt-5/qmake-variable-reference.html#configOr maybe use
CONFIG += c++latest
-
wrote on 17 Apr 2020, 08:23 last edited by
That worked. Thanks.
5/7