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

--- Comment #4 from Jason Liam <jlame646 at gmail dot com> ---
(In reply to Andrew Pinski from comment #2)
> I meant to write:
> Concepts are not supposed to error out if there was an error in substitution.
> So this is all by design of the language.

(In reply to Andrew Pinski from comment #2)
> I meant to write:
> Concepts are not supposed to error out if there was an error in substitution.
> So this is all by design of the language.

Then why gcc rejects the following program: https://godbolt.org/z/W6d5EnvWf

```
#include <iostream>
#include <type_traits> 
#include <concepts>
struct A{
    static constexpr int value = 0;
};
template < typename T >
concept test = std::same_as <T::value, int(int) >;  
struct D
{
    int func(int);
};
int main()
{ 
    std::cout << test<D>;   //gcc rejects this but msvc accepts this
}  
```
I mean according to your given description(that concepts are not supposed to
error out...), this should also be false, right? But gcc rejects this.

Reply via email to