Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.2
-
None
Description
Hello,
when trying to use current Qt dev with clang, on Linux, with -std=c++20, and gcc-11's standard library, I get the following :
In file included from /opt/qt6/include/QtCore/qobject.h:57: /opt/qt6/include/QtCore/qproperty.h:105:72: error: no type named 'source_location' in namespace 'std' QPropertyBindingSourceLocation(const QT_SOURCE_LOCATION_NAMESPACE::source_location &cppLocation) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ /opt/qt6/include/QtCore/qproperty.h:200:92: error: no member named 'source_location' in namespace 'std' auto makePropertyBinding(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It seems that clang provides the source_location header, but without the content :
#include <source_location> std::source_location x;
builds fine with
g++ -std=c++20 -c foo.cpp
but not with
clang++ -std=c++20 -c foo.cpp
(which uses libstdc++ by default)
Both seem to support the __cpp_lib_source_location feature test macro, if that can be of any use.
Attachments
Issue Links
- duplicates
-
QTBUG-93270 QPropertyBindingSourceLocation won't compile bacause of wrong source_location selection
- Closed