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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE on invalid use of       |[8/9/10/11 Regression] ICE
                   |non-static member function  |on invalid use of
                   |in trailing return type     |non-static member function
                   |since r251438               |in trailing return type
                   |                            |since r8-2724
           Keywords|                            |ice-on-invalid-code
                 CC|                            |jason at gcc dot gnu.org
      Known to fail|                            |10.2.0, 11.0, 8.4.0, 9.3.0
      Known to work|                            |7.5.0

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
GCC 7.5 rejects with:

<source>: In function 'int main()':
<source>:7:29: error: no matching function for call to 'tmp::func<int>()'
 int main() { tmp::func<int>(); }
                             ^
<source>:4:34: note: candidate: template<class E> static
enable_if_t<is_integral<E>()> tmp::func()
   template <class E> static auto func() -> enable_if_t<is_integral<E>()>;
                                  ^~~~
<source>:4:34: note:   template argument deduction/substitution failed:
<source>: In substitution of 'template<class E> static
enable_if_t<is_integral<E>()> tmp::func() [with E = int]':
<source>:7:29:   required from here
<source>:4:70: error: cannot call member function 'constexpr bool
tmp::is_integral() [with <template-parameter-1-1> = int]' without object
   template <class E> static auto func() -> enable_if_t<is_integral<E>()>;
                                                        ~~~~~~~~~~~~~~^~

Reply via email to