Home
last modified time | relevance | path

Searched refs:enable_if (Results 1 – 25 of 196) sorted by relevance

12345678

/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dunaddressable-functions.cpp5 void check(int *) __attribute__((enable_if(false, "")));
33 void foo(int) __attribute__((enable_if(false, "")));
39 void foo() __attribute__((enable_if(false, "")));
41 void bar() __attribute__((enable_if(true, "")));
42 void bar() __attribute__((enable_if(false, "")));
45 void baz(int a) __attribute__((enable_if(a, "")));
48 void qux(int a) __attribute__((enable_if(1, "")));
50 void qux(int a) __attribute__((enable_if(a, "")));
75 void bar() __attribute__((enable_if(true, "")));
89 void foo() __attribute__((enable_if(false, "")));
[all …]
H A Denable_if.cpp181 int ovlBar(int) __attribute__((enable_if(true, "")));
260 void foo(void *c) __attribute__((enable_if(0, "")));
261 void foo(int *c) __attribute__((enable_if(c, "")));
262 void foo(char *c) __attribute__((enable_if(1, "")));
354 __attribute__((enable_if(num != 0, "")));
356 __attribute__((enable_if(num != 1, "")));
472 void f() __attribute__((enable_if(ok(), "")));
478 int foo(int a) __attribute__((enable_if(a, "")));
512 void foo(int a) __attribute__((enable_if(a, "")));
513 void foo(float a) __attribute__((enable_if(1, "")));
[all …]
H A Dlibcxx_move_hack.cpp12 template<bool B, typename T> struct enable_if;
13 template<typename T> struct enable_if<true, T> { typedef T type; }; struct
15 template<typename T> typename enable_if<__is_convertible(T, rv), T>::type move(T &);
16 template<typename T> typename enable_if<!__is_convertible(T, rv), T&>::type move(T &);
18 …template<typename U, typename T> typename enable_if<__is_convertible(T, rv), U>::type forward(T &);
19 …template<typename U, typename T> typename enable_if<!__is_convertible(T, rv), U&>::type forward(T …
H A Dmicrosoft-vs-float128.cpp4 template <bool> struct enable_if {}; struct
5 template<> struct enable_if<true> { typedef void type; }; struct
15 template <typename T, typename = typename enable_if<
/llvm-project-15.0.7/clang/test/Sema/
H A Denable_if.c31 __attribute__((enable_if(__builtin_object_size(s, 0) != -1, in strnlen()
39 __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
41 __attribute__((enable_if(maxlen <= __builtin_object_size(s, 0),
47 __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
49 __attribute__((enable_if(maxlen > __builtin_object_size(s, 0),
121 void f2(void) __attribute__((overloadable)) __attribute__((enable_if(1, "always chosen")));
122 void f2(void) __attribute__((overloadable)) __attribute__((enable_if(0, "never chosen")));
123 void f2(void) __attribute__((overloadable)) __attribute__((enable_if(TRUE, "always chosen #2")));
131 void f3(int m) __attribute__((overloadable)) __attribute__((enable_if(m >= 0, "positive")));
132 void f3(int m) __attribute__((overloadable)) __attribute__((enable_if(m < 0, "negative")));
[all …]
H A Doverloadable.c95 void foo(char *c) __attribute__((overloadable, enable_if(c, "nope.jpg"))); in conversions()
118 void disabled(void *c) __attribute__((overloadable, enable_if(0, ""))); in fn_type_conversions()
119 void disabled(int *c) __attribute__((overloadable, enable_if(c, ""))); in fn_type_conversions()
120 void disabled(char *c) __attribute__((overloadable, enable_if(1, "The function name lies."))); in fn_type_conversions()
207 void to_foo6(int) __attribute__((enable_if(1, ""), overloadable)); // expected-note{{previous overl…
208 void to_foo6(int) __attribute__((enable_if(1, ""))); // expected-error{{must have the 'overloadable…
209 void to_foo6(int) __attribute__((enable_if(1, ""), overloadable));
211 void to_foo7(int) __attribute__((enable_if(1, ""))); // expected-note{{previous unmarked overload}}
212 void to_foo7(int) __attribute__((enable_if(1, ""), overloadable)); // expected-error{{must not have…
213 void to_foo7(int) __attribute__((enable_if(1, "")));
[all …]
H A Denable_if-ext.c11 __attribute__ (( enable_if(1, "") ))
23 __attribute__ (( enable_if(0, "") ))
37 __attribute__ (( enable_if(1, "") ))
43 __attribute__ (( enable_if(0, "") ))
/llvm-project-15.0.7/clang/test/SemaTemplate/
H A Doverload-candidates.cpp47 template<bool, typename = void> struct enable_if {}; struct
48 template<typename T> struct enable_if<true, T> { typedef T type; }; struct
54 template<typename Cond, typename T = void> struct enable_if : boost::enable_if<Cond::value, T> {}; struct
58 template<typename T> typename llvm::enable_if<is_int<T> >::type if_int(); // expected-note{{candida…
86 template<bool, typename = void> struct enable_if {}; struct
87 template<typename T> struct enable_if<true, T> { typedef T type; }; struct
99 typename Requires = typename std::enable_if<a_trait<T>::value>::type> argument
113 struct a_pony : std::enable_if<some_trait<T>::value> {};
127 using unicorns = typename std::enable_if<some_trait<T>::value>::type;
150 …typename std::enable_if<n == 43 || (some_passing_trait<T>::value && some_trait<T>::value), int>::t…
[all …]
H A Ddiagnose-enable-if-t.cpp8 template<bool, class = void> struct enable_if {}; struct
9 template<class T> struct enable_if<true, T> { using type = T; }; struct
10 template<bool B, class T = void> using enable_if_t = typename enable_if<B, T>::type;
33 template<bool, class = void> struct enable_if {}; struct
34 template<class T> struct enable_if<true, T> { using type = T; }; struct
35 template<bool B, class T = void> using __enable_if_t = typename enable_if<B, T>::type;
77 template<bool, class = void> struct enable_if {}; struct
78 template<class T> struct enable_if<true, T> { using type = T; }; argument
79 template<bool B, class T = void> using a_pony = typename enable_if<B, T>::type;
/llvm-project-15.0.7/clang/test/CodeGen/
H A Denable_if.c6 void foo(int m) __attribute__((overloadable, enable_if(m > 0, "")));
30 void bar(int m) __attribute__((overloadable, enable_if(m > 0, "")));
31 void bar(int m) __attribute__((overloadable, enable_if(1, "")));
53 void baz(int m) __attribute__((overloadable, enable_if(1, "")));
69 void qux(int m) __attribute__((overloadable, enable_if(1, ""),
70 enable_if(TRUEFACTS, "")));
71 void qux(int m) __attribute__((overloadable, enable_if(1, "")));
89 int foo(char *i) __attribute__((enable_if(1, ""), overloadable)); in test5()
91 __attribute__((enable_if(1, ""), overloadable)); in test5()
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Denable_if.cpp6 T test5(T) __attribute__((enable_if(1, "better than non-template")));
14 void test1(int i) __attribute__((enable_if(i == 1, ""))) {} in test1()
18 void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {} in test2()
21 void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {} in test3()
26 …virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == …
H A Dmangle-exprs.cpp36 struct enable_if { typedef T type; }; argument
39 struct enable_if< false, T > {}; struct
44 void implicit(typename enable_if< O <= 4 >::type* = 0) { in implicit()
48 void cstyle(typename enable_if< O <= (unsigned)4 >::type* = 0) { in cstyle()
52 void functional(typename enable_if< O <= unsigned(4) >::type* = 0) { in functional()
56 void static_(typename enable_if< O <= static_cast<unsigned>(4) >::type* = 0) { in static_()
60 void reinterpret_(typename enable_if<O <= sizeof(reinterpret_cast<T *>(0))>::type * = 0) { in reinterpret_()
64 void const_(typename enable_if<0 <= sizeof(const_cast<T *>(p))>::type * = 0) { in const_()
68 void dynamic_(typename enable_if<0 <= sizeof(dynamic_cast<T *>(p))>::type * = 0) { in dynamic_()
379 void cpp_nullptr(typename enable_if<P == nullptr>::type* = 0) { in cpp_nullptr()
[all …]
/llvm-project-15.0.7/libcxx/include/
H A Dmath.h341 typename std::enable_if<
348 typename std::enable_if<
365 typename std::enable_if<
372 typename std::enable_if<
450 typename std::enable_if<
618 typename std::enable_if
648 typename std::enable_if
678 typename std::enable_if
708 typename std::enable_if
738 typename std::enable_if
[all …]
H A Dvalarray1349 typename enable_if
1373 typename enable_if
1388 typename enable_if
1403 typename enable_if
1418 typename enable_if
1433 typename enable_if
1448 typename enable_if
1463 typename enable_if
1478 typename enable_if
1493 typename enable_if
[all …]
/llvm-project-15.0.7/clang/test/Modules/Inputs/overloadable-attrs/
H A Da.h2 constexpr int fn1() __attribute__((enable_if(0, ""))) { return 0; } in fn1()
6 constexpr int fn2() __attribute__((enable_if(0, ""))) { return 0; } in fn2()
8 constexpr int fn3(int i) __attribute__((enable_if(!i, ""))) { return 0; } in fn3()
9 constexpr int fn3(int i) __attribute__((enable_if(i, ""))) { return 1; } in fn3()
12 constexpr int fn4(int i) __attribute__((enable_if(i, ""))) { return 1; } in fn4()
14 constexpr int fn5(int i) __attribute__((enable_if(i, ""))) { return 1; } in fn5()
/llvm-project-15.0.7/libcxx/test/support/
H A Darchetypes.h66 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
70 template <bool Dummy = true, typename std::enable_if<Dummy && !Explicit, bool>::type = true>
74 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
78 template <bool Dummy = true, typename std::enable_if<Dummy && !Explicit, bool>::type = true>
82 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
87 template <bool Dummy = true, typename std::enable_if<Dummy && !Explicit, bool>::type = true>
143 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
145 template <bool Dummy = true, typename std::enable_if<Dummy && !Explicit, bool>::type = true>
147 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
151 template <bool Dummy = true, typename std::enable_if<Dummy && Explicit, bool>::type = true>
[all …]
/llvm-project-15.0.7/clang/test/SemaCUDA/
H A Dautoret-global.cu24 template <bool Cond, typename T = void> struct enable_if { typedef T type; }; struct
25 template <typename T> struct enable_if<false, T> {}; struct
29 auto bar() -> typename enable_if<N == 1>::type { in bar()
35 auto bar() -> typename enable_if<N == 2>::type { in bar()
/llvm-project-15.0.7/libcxx/include/__type_traits/
H A Denable_if.h20 template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {}; struct
21 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;};
23 template <bool _Bp, class _Tp = void> using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp,…
26 template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
/llvm-project-15.0.7/clang/test/CXX/temp/temp.decls/temp.variadic/
H A Dsizeofpack.cpp75 struct enable_if { }; struct
77 template<class T> struct enable_if<true, T> { struct
84 void cxx_throw(typename enable_if<(sizeof...(Args) > 0), const char *>::type fmt, Args&&... args) { in cxx_throw()
152 struct enable_if struct
155 struct enable_if<true,_Tp> struct
172 typename enable_if<is_array_of<sizeof...(Args), size_t, Args...>::value,
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dforwarding-reference-overload.cpp4 template <bool B, class T = void> struct enable_if { typedef T type; }; struct
6 template <class T> struct enable_if<true, T> { typedef T type; }; argument
9 using enable_if_t = typename enable_if<B, T>::type;
15 template <class T> struct enable_if { typedef T type; }; argument
42 Test1(T &&n, typename foo::enable_if<long>::type i = 5, ...);
64 template <typename T, typename X = typename std::enable_if<
70 Test2(T &&n, typename std::enable_if<just_true<T>>::type **a = nullptr);
234 typename foo::enable_if<T>::type = 0>
/llvm-project-15.0.7/libcxx/test/std/numerics/complex.number/cmplx.over/
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::… in test()
75 test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0, typename std::enable_if<!std:… in test()
/llvm-project-15.0.7/clang/test/CXX/temp/temp.fct.spec/temp.deduct/
H A Dsfinae-1.cpp27 struct enable_if { struct
32 struct enable_if<false, T> { }; struct
35 typename enable_if<sizeof(T) == 17>::type
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/misc/
H A Dconst-correctness-transform-values.cpp145 struct enable_if {}; struct
148 struct enable_if<true, Tp> { using type = Tp; }; argument
154 template <typename T2 = T, typename = typename enable_if<is_integral<T2>::value>::type>
157 template <typename T2 = T, typename = typename enable_if<not_integral<T2>::value>::type>
/llvm-project-15.0.7/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/
H A Dreverse.pass.cpp27 …typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::val…
33 …typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::val…
41 …typename std::enable_if<!is_same_iterator_category<Iterator1, std::forward_iterator_tag>::value>::…
56 …typename std::enable_if<is_same_iterator_category<Iterator1, std::forward_iterator_tag>::value>::t…
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dforwarding-reference-overload.rst28 // C3: perfect forwarding ctor guarded with enable_if
32 // C4: variadic perfect forwarding ctor guarded with enable_if
45 like C3 and C4 that are guarded with an ``enable_if``, assuming the programmer was
51 For deciding whether a constructor is guarded with enable_if, we consider the
54 part of these types is ``std::enable_if`` or ``std::enable_if_t``, we assume the

12345678