19 lines · cpp
1// RUN: %clang_cc1 -std=c++17 -verify %s2 3// expected-no-diagnostics4 5template <class T> struct add_restrict {6 typedef T __restrict type;7};8 9template <class T, class V> struct is_same {10 static constexpr bool value = false;11};12 13template <class T> struct is_same<T, T> {14 static constexpr bool value = true;15};16 17static_assert(is_same<int & __restrict, add_restrict<int &>::type>::value, "");18static_assert(is_same<int(), add_restrict<int()>::type>::value, "");19