Replace fragile and wrong check for library feature.

Compiler versions do not imply standard library versions, and even where
the compiler and standard library versions were matched, this check was
wrong.
This commit is contained in:
David Chisnall
2023-02-13 10:39:29 +00:00
committed by David Chisnall
parent 4370a23f3e
commit cef56c4262

View File

@@ -109,8 +109,7 @@ namespace snmalloc
#define TOSTRING(expr) TOSTRING2(expr)
#define TOSTRING2(expr) #expr
#if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 11) || \
(defined(__clang__) && __clang_major__ >= 15)
#ifdef __cpp_lib_source_location
# include <source_location>
# define SNMALLOC_CURRENT_LINE std::source_location::current().line()
# define SNMALLOC_CURRENT_FILE std::source_location::current().file_name()