diff options
Diffstat (limited to 'test/SemaTemplate/temp_class_spec.cpp')
-rw-r--r-- | test/SemaTemplate/temp_class_spec.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/temp_class_spec.cpp b/test/SemaTemplate/temp_class_spec.cpp index 1efb364a1b..710fa4ada5 100644 --- a/test/SemaTemplate/temp_class_spec.cpp +++ b/test/SemaTemplate/temp_class_spec.cpp @@ -19,6 +19,19 @@ int array1[is_pointer<int*>::value? 1 : -1]; int array2[is_pointer<const int*>::value? 1 : -1]; // expected-error{{partial ordering}} \ // expected-error{{negative}} +template<typename T> +struct is_lvalue_reference { + static const bool value = false; +}; + +template<typename T> +struct is_lvalue_reference<T&> { + static const bool value = true; +}; + +int lvalue_ref0[is_lvalue_reference<int>::value? -1 : 1]; +int lvalue_ref1[is_lvalue_reference<const int&>::value? 1 : -1]; + template<typename T, typename U> struct is_same { static const bool value = false; |