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

Johel Ernesto Guerrero Peña <johelegp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johelegp at gmail dot com

--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
I happened upon the same bug when changing a trait to be specialized directly
through the variable template rather than a class template. In my case, I
asserted through the variable template, so I can confirm that it's solely a bug
with modules and not with concepts.

See https://godbolt.org/z/jPT9T6ovP.

mod.cpp:
```C++
export module mod;

export
template< class T >
inline constexpr bool probe = false;
//
template< class R, class C >
inline constexpr bool probe<R C::* > = true;

struct S { int f( ); };
using mf_t = decltype( &S::f );

static_assert( probe< mf_t > );
```

test.cpp:
```C++
import mod;

struct S { int f( ); };
using mf_t = decltype( &S::f );

static_assert( probe< mf_t > );
```

Output:
```
test.cpp:6:16: error: static assertion failed
    6 | static_assert( probe< mf_t > );
      |                ^~~~~~~~~~~~~
```

Reply via email to