Searched refs:enable_if (Results 1 - 25 of 65) sorted by relevance

123

/external/clang/test/CodeGenCXX/
H A Denable_if.cpp2 // Test itanium mangling for attribute enable_if
5 void test1(int i) __attribute__((enable_if(i == 1, ""))) {}
9 void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {}
12 void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {}
17 virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == 2, "")));
H A Dmangle-exprs.cpp36 struct enable_if { typedef T type; }; struct
39 struct enable_if< false, T > {}; struct
44 void implicit(typename enable_if< O <= 4 >::type* = 0) {
48 void cstyle(typename enable_if< O <= (unsigned)4 >::type* = 0) {
52 void functional(typename enable_if< O <= unsigned(4) >::type* = 0) {
56 void static_(typename enable_if< O <= static_cast<unsigned>(4) >::type* = 0) {
/external/libcxx/test/utilities/meta/meta.trans/meta.trans.other/
H A Denable_if.fail.cpp12 // enable_if
18 typedef std::enable_if<false>::type A;
H A Denable_if.pass.cpp12 // enable_if
18 static_assert((std::is_same<std::enable_if<true>::type, void>::value), "");
19 static_assert((std::is_same<std::enable_if<true, int>::type, int>::value), "");
/external/clang/test/SemaCXX/
H A Denable_if.cpp9 X(bool b) __attribute__((enable_if(b, "chosen when 'b' is true"))); // expected-note{{candidate disabled: chosen when 'b' is true}}
11 void f(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero")));
12 void f(int n) __attribute__((enable_if(n == 1, "chosen when 'n' is one"))); // expected-note{{member declaration nearly matches}} expected-note{{candidate disabled: chosen when 'n' is one}}
14 static void s(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))); // expected-note2{{candidate disabled: chosen when 'n' is zero}}
16 void conflict(int n) __attribute__((enable_if(n+n == 10, "chosen when 'n' is five"))); // expected-note{{candidate function}}
17 void conflict(int n) __attribute__((enable_if(n*2 == 10, "chosen when 'n' is five"))); // expected-note{{candidate function}}
19 operator long() __attribute__((enable_if(true, "chosen on your platform")));
20 operator int() __attribute__((enable_if(false, "chosen on other platform")));
22 operator fp() __attribute__((enable_if(false, "never enabled"))) { return surrogate; } // expected-note{{conversion candidate of type 'int (*)(int)'}} // FIXME: the message is not displayed
25 void X::f(int n) __attribute__((enable_if(
[all...]
H A Dalias-template.cpp149 template<bool> struct enable_if; // expected-note 2{{here}}
150 template<> struct enable_if<true> { using type = void; };
154 template<typename T> using EnableIf = typename enable_if<T::value>::type; // expected-error {{undefined template}}
155 template<typename T> using DisableIf = typename enable_if<!T::value>::type; // expected-error {{undefined template}}
/external/clang/test/Sema/
H A Denable_if.c8 int open(const char *pathname, int flags) __attribute__((enable_if(!(flags & O_CREAT), "must specify mode when using O_CREAT"))) __attribute__((overloadable)); // expected-note{{candidate disabled: must specify mode when using O_CREAT}}
29 __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
37 __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
39 __attribute__((enable_if(maxlen <= __builtin_object_size(s, 0),
45 __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
47 __attribute__((enable_if(maxlen > __builtin_object_size(s, 0),
69 __attribute__((enable_if(c <= -1 || c > 255, "'c' must have the value of an unsigned char or EOF")))
81 __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))) void f1(int n); // expected-error{{use of undeclared identifier 'n'}}
83 int n __attribute__((enable_if(1, "always chosen"))); // expected-warning{{'enable_if' attribut
[all...]
/external/clang/test/CXX/temp/temp.fct.spec/temp.deduct/
H A Dsfinae-1.cpp27 struct enable_if { struct in namespace:instantiation_order1
32 struct enable_if<false, T> { }; struct in namespace:instantiation_order1
35 typename enable_if<sizeof(T) == 17>::type
/external/clang/test/SemaTemplate/
H A Doverload-candidates.cpp45 template<bool, typename = void> struct enable_if {}; struct in namespace:boost
46 template<typename T> struct enable_if<true, T> { typedef T type; }; struct in namespace:boost
48 template<typename T> typename boost::enable_if<sizeof(T) == 4, int>::type if_size_4(); // expected-note{{candidate template ignored: disabled by 'enable_if' [with T = char]}}
52 template<typename Cond, typename T = void> struct enable_if : boost::enable_if<Cond::value, T> {}; struct in namespace:llvm
56 template<typename T> typename llvm::enable_if<is_int<T> >::type if_int(); // expected-note{{candidate template ignored: disabled by 'enable_if' [with T = char]}}
62 typename boost::enable_if<sizeof(T) == 4, int>::type f(); // expected-error{{no type named 'type' in 'boost::enable_if<fals
84 template<bool, typename = void> struct enable_if {}; struct in namespace:std
85 template<typename T> struct enable_if<true, T> { typedef T type; }; struct in namespace:std
[all...]
/external/clang/test/CXX/temp/temp.decls/temp.variadic/
H A Dsizeofpack.cpp75 struct enable_if { }; struct in namespace:pr13272
77 template<class T> struct enable_if<true, T> { struct in namespace:pr13272
84 void cxx_throw(typename enable_if<(sizeof...(Args) > 0), const char *>::type fmt, Args&&... args) {
152 struct enable_if struct in namespace:pr15112
155 struct enable_if<true,_Tp> struct in namespace:pr15112
172 typename enable_if<is_array_of<sizeof...(Args), size_t, Args...>::value,
/external/libcxx/test/numerics/complex.number/cmplx.over/
H A Darg.pass.cpp24 test(T x, typename std::enable_if<std::is_integral<T>::value>::type* = 0)
32 test(T x, typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
H A Dnorm.pass.cpp24 test(T x, typename std::enable_if<std::is_integral<T>::value>::type* = 0)
32 test(T x, typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
H A Dconj.pass.cpp26 test(T x, typename std::enable_if<std::is_integral<T>::value>::type* = 0)
34 test(T x, typename std::enable_if<std::is_floating_point<T>::value>::type* = 0)
42 test(T x, typename std::enable_if<!std::is_integral<T>::value &&
H A Dproj.pass.cpp26 test(T x, typename std::enable_if<std::is_integral<T>::value>::type* = 0)
34 test(T x, typename std::enable_if<std::is_floating_point<T>::value>::type* = 0)
42 test(T x, typename std::enable_if<!std::is_integral<T>::value &&
H A Dpow.pass.cpp32 promote(T, typename std::enable_if<std::is_integral<T>::value>::type* = 0);
67 test(typename std::enable_if<std::is_integral<T>::value>::type* = 0, typename std::enable_if<!std::is_integral<U>::value>::type* = 0)
75 test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0, typename std::enable_if<!std::is_integral<U>::value>::type* = 0)
H A Dimag.pass.cpp24 test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
38 test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
H A Dreal.pass.cpp24 test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
38 test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
/external/chromium_org/v8/src/base/
H A Dsafe_math_impl.h43 struct enable_if {}; struct in namespace:v8::base::internal
46 struct enable_if<true, T> { typedef T type; }; struct in namespace:v8::base::internal
97 typedef typename enable_if<
104 typedef typename enable_if<
111 typedef typename enable_if<
120 static const typename enable_if<std::numeric_limits<Integer>::is_integer,
140 // TODO(jschuh): Break this code out from the enable_if pattern and find a clean
144 typename enable_if<std::numeric_limits<T>::is_integer, T>::type
167 typename enable_if<std::numeric_limits<T>::is_integer, T>::type
194 typename enable_if<
249 CheckedDiv( T x, T y, RangeConstraint* validity, typename enable_if<std::numeric_limits<T>::is_integer, int>::type = 0) argument
408 CheckedNumericState( Src value, typename enable_if<std::numeric_limits<Src>::is_specialized, int>::type = 0) argument
432 CheckedNumericState( Src value, RangeConstraint validity, typename enable_if<std::numeric_limits<Src>::is_integer, int>::type = 0) argument
456 CheckedNumericState( Src value, typename enable_if<std::numeric_limits<Src>::is_specialized, int>::type = 0) argument
[all...]
/external/libcxx/test/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/
H A Dpointer_deleter01.pass.cpp69 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
75 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
79 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
H A Dmove02.pass.cpp70 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
76 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
80 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
H A Dmove_convert08.fail.cpp82 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
88 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
92 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
H A Dmove_convert11.fail.cpp82 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
88 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0);
92 typename std::enable_if<!std::is_same<U, T>::value>::type* = 0)
/external/chromium_org/base/numerics/
H A Dsafe_math_impl.h67 typedef typename enable_if<
74 typedef typename enable_if<
81 typedef typename enable_if<
90 static const typename enable_if<std::numeric_limits<Integer>::is_integer,
110 // TODO(jschuh): Break this code out from the enable_if pattern and find a clean
114 typename enable_if<std::numeric_limits<T>::is_integer, T>::type
137 typename enable_if<std::numeric_limits<T>::is_integer, T>::type
164 typename enable_if<
176 typename enable_if<std::numeric_limits<T>::is_integer&& std::numeric_limits<
205 typename enable_if<st
218 CheckedDiv( T x, T y, RangeConstraint* validity, typename enable_if<std::numeric_limits<T>::is_integer, int>::type = 0) argument
377 CheckedNumericState( Src value, typename enable_if<std::numeric_limits<Src>::is_specialized, int>::type = 0) argument
401 CheckedNumericState( Src value, RangeConstraint validity, typename enable_if<std::numeric_limits<Src>::is_integer, int>::type = 0) argument
428 CheckedNumericState( Src value, typename enable_if<std::numeric_limits<Src>::is_specialized, int>::type = 0) argument
[all...]
/external/llvm/include/llvm/Support/
H A Dtype_traits.h71 T, typename std::enable_if<std::is_pointer<T>::value>::type> {
82 T, typename std::enable_if<std::is_pointer<T>::value>::type> {
/external/chromium_org/base/
H A Dcallback_internal.h166 typename enable_if<!IsMoveOnlyType<T>::value, T>::type& CallbackForward(T& t) {
171 typename enable_if<IsMoveOnlyType<T>::value, T>::type CallbackForward(T& t) {

Completed in 508 milliseconds

123