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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-07-24
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Don't do that then ;-)

Some of these are easy to fix in the library like so:

--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -114,7 +114,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION

 #if __glibcxx_shared_ptr_arrays >= 201707L
   // Constraint for overloads taking array types with unknown bound, U[].
-#if __cpp_concepts
+#if __cpp_concepts && __glibcxx_type_trait_variable_templates
   template<typename _Tp>
     requires is_array_v<_Tp> && (extent_v<_Tp> == 0)
     using _UnboundedArray = _Tp;


But there's a compiler bug here too:

template<class T> struct S { ~S(); };
template<class T> S<T>::~S() { }

$ g++ -std=gnu++14 -fconcepts -c dest.cc
dest.cc:2:25: error: declaration of '~ S' as non-member
    2 | template<class T> S<T>::~S() { }
      |                         ^~

Reply via email to