jwakely added a comment.

The simplest solution would be to change libstdc++'s `<new>` to:

  #if __cplusplus >= 201703L && __cpp_impl_destroying_delete
  #define __cpp_lib_destroying_delete 201806L

Or we could be fancier and do:

  #if __cplusplus >= 201103L && __cpp_impl_destroying_delete
  namespace std
  {
    struct destroying_delete_t
    {
      explicit destroying_delete_t() = default;
    };
  #if __cplusplus >= 201703L
  # define __cpp_lib_destroying_delete 201806L
    inline constexpr destroying_delete_t destroying_delete{};
  #endif
  }
  #endif // destroying delete

i.e. define the type for C++11 and later, and the inline variable (and 
feature-test macro) only for C++17 when inline variables are supported.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55741/new/

https://reviews.llvm.org/D55741



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to