1 // { dg-options "-std=c++17 -fconcepts" }
3 template <class X> concept bool allocatable = requires{{new X}->X * };
4 template <class X> concept bool semiregular = allocatable<X>;
5 template <class X> concept bool readable = requires{requires semiregular<X>};
6 template <class> int weak_input_iterator = requires{{0}->readable};
7 template <class X> bool input_iterator{weak_input_iterator<X>};
8 template <class X> bool forward_iterator{input_iterator<X>};
9 template <class X> bool bidirectional_iterator{forward_iterator<X>};
11 concept bool random_access_iterator{bidirectional_iterator<X>};
12 void fn1(random_access_iterator);
13 int main() { fn1(0); } // { dg-error "" }