forked from boostorg/assert
Use __cpp_lib_source_location instead of BOOST_NO_CXX20_HDR_SOURCE_LOCATION
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX20_HDR_SOURCE_LOCATION)
|
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
||||||
# include <source_location>
|
# include <source_location>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX20_HDR_SOURCE_LOCATION)
|
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
||||||
|
|
||||||
BOOST_CONSTEXPR source_location( std::source_location const& loc ) BOOST_NOEXCEPT: file_( loc.file_name() ), function_( loc.function_name() ), line_( loc.line() ), column_( loc.column() )
|
BOOST_CONSTEXPR source_location( std::source_location const& loc ) BOOST_NOEXCEPT: file_( loc.file_name() ), function_( loc.function_name() ), line_( loc.line() ), column_( loc.column() )
|
||||||
{
|
{
|
||||||
|
@@ -25,7 +25,7 @@ int main()
|
|||||||
BOOST_TEST_EQ( loc.column(), 0 );
|
BOOST_TEST_EQ( loc.column(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX20_HDR_SOURCE_LOCATION)
|
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L
|
||||||
|
|
||||||
{
|
{
|
||||||
std::source_location loc = std::source_location::current();
|
std::source_location loc = std::source_location::current();
|
||||||
|
Reference in New Issue
Block a user