blob: e1e3eac416cab2c8cc6d585d195cd0deabbd1d13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// PR c++/67018
// { dg-options "-std=c++17 -fconcepts" }
template <typename T>
constexpr bool Val = true;
template <class I>
concept bool InputIterator = requires (I i) {
requires Val <decltype(i++)>;
};
template <class I>
concept bool ForwardIterator = InputIterator<I> && true;
template<InputIterator>
constexpr bool f() { return false; }
template<ForwardIterator>
constexpr bool f() { return true; }
static_assert(f<int*>());
|