OLD | NEW |
1 // RUN: %clang_cc1 -fsyntax-only -verify %s | 1 // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | 2 |
3 // PR6619 | 3 // PR6619 |
4 template<bool C> struct if_c { }; | 4 template<bool C> struct if_c { }; |
5 template<typename T1> struct if_ { | 5 template<typename T1> struct if_ { |
6 typedef if_c< static_cast<bool>(T1::value)> almost_type_; // expected-note 7{{
in instantiation}} | 6 typedef if_c< static_cast<bool>(T1::value)> almost_type_; // expected-note 7{{
in instantiation}} |
7 }; | 7 }; |
8 template <class Model, void (Model::*)()> struct wrap_constraints { }; | 8 template <class Model, void (Model::*)()> struct wrap_constraints { }; |
9 template <class Model>· | 9 template <class Model>· |
10 inline char has_constraints_(Model* , // expected-note 4{{while substituting de
duced template arguments into function template 'has_constraints_' [with }} \ | 10 inline char has_constraints_(Model* , // expected-note 4{{while substituting de
duced template arguments into function template 'has_constraints_' [with }} \ |
(...skipping 11 matching lines...) Expand all Loading... |
22 }; | 22 }; |
23 template <class Model> struct usage_requirements { | 23 template <class Model> struct usage_requirements { |
24 }; | 24 }; |
25 template < typename TT > struct InputIterator { | 25 template < typename TT > struct InputIterator { |
26 typedef instantiate< & requirement_<void(*)(usage_requirements<InputIterato
r> x)>::failed> boost_concept_check1; // expected-note 2{{in instantiation}} | 26 typedef instantiate< & requirement_<void(*)(usage_requirements<InputIterato
r> x)>::failed> boost_concept_check1; // expected-note 2{{in instantiation}} |
27 }; | 27 }; |
28 template < typename TT > struct ForwardIterator : I
nputIterator<TT> { // expected-note 2{{in instantia
tion}} | 28 template < typename TT > struct ForwardIterator : I
nputIterator<TT> { // expected-note 2{{in instantia
tion}} |
29 typedef instantiate< & requirement_<void(*)(usage_requirements<ForwardIterator
> x)>::failed> boost_concept_check2; // expected-note 2 {{in instantiation}} | 29 typedef instantiate< & requirement_<void(*)(usage_requirements<ForwardIterator
> x)>::failed> boost_concept_check2; // expected-note 2 {{in instantiation}} |
30 | 30 |
31 }; | 31 }; |
32 typedef instantiate< &requirement_<void(*)(ForwardIterator<char*> x)>::failed> b
oost_concept_checkX; // expected-error{{no member named}} \ | 32 typedef instantiate< &requirement_<void(*)(ForwardIterator<char*> x)>::failed> b
oost_concept_checkX;// expected-note 6{{in instantiation}} |
33 // expected-note 6{{in instantiation}} | |
34 | 33 |
35 template<typename T> struct X0 { }; | 34 template<typename T> struct X0 { }; |
36 template<typename R, typename A1> struct X0<R(A1 param)> { }; | 35 template<typename R, typename A1> struct X0<R(A1 param)> { }; |
37 | 36 |
38 template<typename T, typename A1, typename A2> | 37 template<typename T, typename A1, typename A2> |
39 void instF0(X0<T(A1)> x0a, X0<T(A2)> x0b) { | 38 void instF0(X0<T(A1)> x0a, X0<T(A2)> x0b) { |
40 X0<T(A1)> x0c; | 39 X0<T(A1)> x0c; |
41 X0<T(A2)> x0d; | 40 X0<T(A2)> x0d; |
42 } | 41 } |
43 | 42 |
44 template void instF0<int, int, float>(X0<int(int)>, X0<int(float)>); | 43 template void instF0<int, int, float>(X0<int(int)>, X0<int(float)>); |
45 | 44 |
46 template<typename R, typename A1, R (*ptr)(A1)> struct FuncPtr { }; | 45 template<typename R, typename A1, R (*ptr)(A1)> struct FuncPtr { }; |
47 template<typename A1, int (*ptr)(A1)> struct FuncPtr<int, A1, ptr> { }; | 46 template<typename A1, int (*ptr)(A1)> struct FuncPtr<int, A1, ptr> { }; |
48 | 47 |
49 template<typename R, typename A1> R unary_func(A1); | 48 template<typename R, typename A1> R unary_func(A1); |
50 | 49 |
51 template<typename R, typename A1, typename A2> | 50 template<typename R, typename A1, typename A2> |
52 void use_func_ptr() { | 51 void use_func_ptr() { |
53 FuncPtr<R, A1, &unary_func<R, A1> > fp1; | 52 FuncPtr<R, A1, &unary_func<R, A1> > fp1; |
54 FuncPtr<R, A2, &unary_func<R, A2> > fp2; | 53 FuncPtr<R, A2, &unary_func<R, A2> > fp2; |
55 }; | 54 }; |
56 | 55 |
57 template void use_func_ptr<int, float, double>(); | 56 template void use_func_ptr<int, float, double>(); |
OLD | NEW |