[Bug c++/51222] [C++11][SFINAE] Unevaluated combined delete new expression completely broken

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 20 09:49:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51222

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We should revisit the library traits now this is fixed:

  // Implementation for non-reference types. To meet the proper
  // variable definition semantics, we also need to test for
  // is_destructible in this case.
  // This form should be simplified by a single expression:
  // ::delete ::new _Tp(declval<_Arg>()), see c++/51222.
  struct __do_is_direct_constructible_impl
  {
    template<typename _Tp, typename _Arg, typename
             = decltype(::new _Tp(declval<_Arg>()))>
      static true_type __test(int);


More information about the Gcc-bugs mailing list