From b69ddbc62838f23ace237c206676b1ed1c882638 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 13 Nov 2024 11:57:16 +0100 Subject: [libc++] Make variables in templates inline (#115785) The variables are all `constexpr`, which implies `inline`. Since they aren't `constexpr` in C++03 they're also not `inline` there. Because of that we define them out-of-line currently. Instead we can use the C++17 extension of `inline` variables, which results in the same weak definitions of the variables but without having all the boilerplate. --- libcxx/src/filesystem/path.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcxx/src/filesystem/path.cpp') diff --git a/libcxx/src/filesystem/path.cpp b/libcxx/src/filesystem/path.cpp index 5874244..9f7dc54 100644 --- a/libcxx/src/filesystem/path.cpp +++ b/libcxx/src/filesystem/path.cpp @@ -24,7 +24,10 @@ using parser::string_view_t; // path definitions /////////////////////////////////////////////////////////////////////////////// +_LIBCPP_DIAGNOSTIC_PUSH +_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated") constexpr path::value_type path::preferred_separator; +_LIBCPP_DIAGNOSTIC_POP path& path::replace_extension(path const& replacement) { path p = extension(); -- cgit v1.1