]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove FIXME for ICE with remove_cvref_t in requires-expression
authorJonathan Wakely <jwakely@redhat.com>
Thu, 1 Sep 2022 10:52:52 +0000 (11:52 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 1 Sep 2022 14:47:30 +0000 (15:47 +0100)
PR c++/99968 is fixed since GCC 12.1 so we can remove the workaround.

libstdc++-v3/ChangeLog:

* include/std/type_traits (is_scoped_enum): Remove workaround.

libstdc++-v3/include/std/type_traits

index 5984442c0aa8e49fd2e2eec2882bd856fdc88f23..5b8314f24fd797ba934c62062637162bd7395b06 100644 (file)
@@ -3534,20 +3534,11 @@ template<typename _Ret, typename _Fn, typename... _Args>
 
   template<typename _Tp>
     requires __is_enum(_Tp)
-    && requires(_Tp __t) { __t = __t; } // fails if incomplete
+    && requires(remove_cv_t<_Tp> __t) { __t = __t; } // fails if incomplete
     struct is_scoped_enum<_Tp>
     : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
     { };
 
-  // FIXME remove this partial specialization and use remove_cv_t<_Tp> above
-  // when PR c++/99968 is fixed.
-  template<typename _Tp>
-    requires __is_enum(_Tp)
-    && requires(_Tp __t) { __t = __t; } // fails if incomplete
-    struct is_scoped_enum<const _Tp>
-    : bool_constant<!requires(_Tp __t, void(*__f)(int)) { __f(__t); }>
-    { };
-
   /// @ingroup variable_templates
   /// @since C++23
   template<typename _Tp>