28 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -std=c++20 -fmodules-cache-path=%t -x c++ %s -verify3// expected-no-diagnostics4#pragma clang module build std5module std [system] { module concepts [system] {} }6#pragma clang module contents7 8#pragma clang module begin std.concepts9template <class T>10T declval();11template<class T, class U>12concept common_reference_with = T::val;13template<class T>14concept input_or_output_iterator = true;15template <class T>16concept input_iterator = input_or_output_iterator<T> &&17 common_reference_with<decltype(declval<T&>)&&, T&>;18#pragma clang module end /*std.concepts*/19#pragma clang module endbuild /*std*/20 21#pragma clang module import std.concepts22template<input_or_output_iterator>23struct iter_value_or_void{};24// ensure that we don't assert on a subsumption check due to improper25// deserialization.26template<input_iterator I>27struct iter_value_or_void<I>{};28