[PATCH] D55741: Implementation Feature Test Macros for P0722R3
Stephan Bergmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 16 14:50:33 PST 2019
sberg added a comment.
One problem I found with the macro `__cpp_impl_destroying_delete` not being conditional on language version is the following: Recent GCC trunk (since https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=76b94d4ba654e9af1882865933343d11f5c3b18b "Implement P0722R3, destroying operator delete.") contains
#if __cpp_impl_destroying_delete
#define __cpp_lib_destroying_delete 201806L
namespace std
{
struct destroying_delete_t
{
explicit destroying_delete_t() = default;
};
inline constexpr destroying_delete_t destroying_delete{};
}
#endif // destroying delete
at "top-level" (i.e., not in a C++20-only `#if` or similar) in `libstdc++-v3/libsupc++/new`. That means that when using Clang against that GCC toolchain, `#include <new>` in C++03 mode will cause `error: unknown type name 'constexpr'`.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55741/new/
https://reviews.llvm.org/D55741
More information about the cfe-commits
mailing list