Issue 74314
Summary Clang does not diagnose out-of-line definition that does not match due to nested requirements
Labels clang:frontend, concepts
Assignees
Reporter ilya-biryukov
    ```cpp
template <class T, class U> constexpr bool is_same_v = __is_same(T, U);
template <class T, class U> constexpr bool is_not_same_v = !__is_same(T, U);

template <class Result>
concept something_interesting = requires {
    true;
    requires is_same_v<int, Result>;
};

template <class T>
struct X {
    void foo() requires requires { requires is_not_same_v<T, int>; };
};

template <class T>
void X<T>::foo() requires requires { requires something_interesting<T>; } {
}
```

Expected: an error that out-of-line definition does not match.
Actual: compiles without an error.
See [godbolt](https://gcc.godbolt.org/z/r7K4P15o5) too.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to