HomeSort by relevance Sort by last modified time
    Searched full:static_assert (Results 1 - 25 of 247) sorted by null

1 2 3 4 5 6 7 8 910

  /external/clang/test/SemaCXX/
static-assert.cpp 5 static_assert(f(), "f"); // expected-error {{static_assert expression is not an integral constant expression}} expected-note {{non-constexpr function 'f' cannot be used in a constant expression}}
6 static_assert(true, "true is not false");
7 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}}
10 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}}
14 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}}
18 static_assert(N == 2, "N is not 2!"); // expected-error {{static_assert failed "N is not 2!"}
    [all...]
trivial-constructor.cpp 4 static_assert(__has_trivial_constructor(T1), "T1 has trivial constructor!");
9 static_assert(!__has_trivial_constructor(T2), "T2 has a user-declared constructor!");
14 static_assert(!__has_trivial_constructor(T3), "T3 has a virtual function!");
18 static_assert(!__has_trivial_constructor(T4), "T4 has a virtual base class!");
22 static_assert(__has_trivial_constructor(T5), "All the direct base classes of T5 have trivial constructors!");
29 static_assert(__has_trivial_constructor(T6), "All nonstatic data members of T6 have trivial constructors!");
34 static_assert(!__has_trivial_constructor(T7), "t4 does not have a trivial constructor!");
38 static_assert(!__has_trivial_constructor(T8), "The base class T2 does not have a trivial constructor!");
trivial-destructor.cpp 4 static_assert(__has_trivial_destructor(T1), "T1 has trivial destructor!");
9 static_assert(!__has_trivial_destructor(T2), "T2 has a user-declared destructor!");
14 static_assert(__has_trivial_destructor(T3), "T3 has a virtual function (but still a trivial destructor)!");
18 static_assert(__has_trivial_destructor(T4), "T4 has a virtual base class! (but still a trivial destructor)!");
22 static_assert(__has_trivial_destructor(T5), "All the direct base classes of T5 have trivial destructors!");
29 static_assert(__has_trivial_destructor(T6), "All nonstatic data members of T6 have trivial destructors!");
34 static_assert(!__has_trivial_destructor(T7), "t2 does not have a trivial destructor!");
38 static_assert(!__has_trivial_destructor(T8), "The base class T2 does not have a trivial destructor!");
literal-type.cpp 3 static_assert(__is_literal(int), "fail");
4 static_assert(__is_literal_type(int), "fail"); // alternate spelling for GCC
5 static_assert(__is_literal(void*), "fail");
7 static_assert(__is_literal(E), "fail");
8 static_assert(__is_literal(decltype(E1)), "fail");
10 static_assert(__is_literal(IAR), "fail");
13 static_assert(__is_literal(Vector), "fail");
14 static_assert(__is_literal(VectorExt), "fail");
45 static_assert(__is_literal(Empty), "fail");
46 static_assert(__is_literal(LiteralType), "fail")
    [all...]
decltype-this.cpp 12 void f() { static_assert(is_same<decltype(this), S*>::value, ""); }
13 void g() const { static_assert(is_same<decltype(this), const S*>::value, ""); }
14 void h() volatile { static_assert(is_same<decltype(this), volatile S*>::value, ""); }
15 void i() const volatile { static_assert(is_same<decltype(this), const volatile S*>::value, ""); }
attr-cxx0x.cpp 21 static_assert(alignof(align_big) == alignof(int), "k's alignment is wrong");
22 static_assert(alignof(align_small) == 1, "j's alignment is wrong");
23 static_assert(alignof(align_multiple) == 8, "l's alignment is wrong");
24 static_assert(alignof(align_member) == 8, "quuux's alignment is wrong");
25 static_assert(sizeof(align_member) == 8, "quuux's size is wrong");
26 static_assert(alignof(align_typedef) == 8, "typedef's alignment is wrong");
27 static_assert(alignof(align_class_template<8>) == 8, "template's alignment is wrong");
28 static_assert(alignof(align_class_template<16>) == 16, "template's alignment is wrong");
30 // static_assert(alignof(align_class_temp_pack_type<short, int, long>) == alignof(long), "template's alignment is wrong");
31 // static_assert(alignof(align_class_temp_pack_expr<8, 16, 32>) == 32, "template's alignment is wrong")
    [all...]
cxx11-user-defined-literals.cpp 22 static_assert('x'_kind == LitKind::Char, "");
23 static_assert(L'x'_kind == LitKind::WideChar, "");
24 static_assert(u'x'_kind == LitKind::Char16, "");
25 static_assert(U'x'_kind == LitKind::Char32, "");
26 static_assert("foo"_kind == LitKind::CharStr, "");
27 static_assert(u8"foo"_kind == LitKind::CharStr, "");
28 static_assert(L"foo"_kind == LitKind::WideStr, "");
29 static_assert(u"foo"_kind == LitKind::Char16Str, "");
30 static_assert(U"foo"_kind == LitKind::Char32Str, "");
31 static_assert(194_kind == LitKind::Integer, "")
    [all...]
constant-expression-cxx11.cpp 6 static_assert(++x, "test"); // expected-error {{not an integral constant expression}}
7 static_assert(false, "test"); // expected-error {{test}}
41 static_assert((void*)p != (void*)q, "");
42 static_assert((A*)p == (A*)q, "");
43 static_assert((Aa*)p != (Aa*)q, "");
47 static_assert((void*)&pp != (void*)&qq, "");
48 static_assert(&(A&)pp == &(A&)qq, ""); member in namespace:DerivedToVBaseCast
49 static_assert(&(Aa&)pp != &(Aa&)qq, "");
54 static_assert(v == w, "");
55 static_assert(v == x, "")
256 static_assert(&x == &y, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
266 static_assert(&s.x == &s.y, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
267 static_assert(&s.x != &s.y, ""); member in namespace:PointerComparison
268 static_assert(&s.x <= &s.y, ""); member in namespace:PointerComparison
269 static_assert(&s.x >= &s.y, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
270 static_assert(&s.x < &s.y, ""); member in namespace:PointerComparison
271 static_assert(&s.x > &s.y, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
280 static_assert(&x == 0, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
287 static_assert(&x == &x, ""); member in namespace:PointerComparison
289 static_assert(&x <= &x, ""); member in namespace:PointerComparison
291 static_assert(&x < &x, "false"); \/\/ expected-error {{false}} member in namespace:PointerComparison
368 static_assert(*p == 's', ""); member in namespace:StringLiteral
379 static_assert(*max == 'z', ""); member in namespace:StringLiteral
    [all...]
nullptr.cpp 93 static_assert(is_same<decltype(g(nullptr)), void*>::value, "");
114 static_assert(__is_scalar(nullptr_t), "");
115 static_assert(__is_pod(nullptr_t), "");
116 static_assert(sizeof(nullptr_t) == sizeof(void*), "");
118 static_assert(!(nullptr < nullptr), "");
119 static_assert(!(nullptr > nullptr), "");
120 static_assert( nullptr <= nullptr, "");
121 static_assert( nullptr >= nullptr, "");
122 static_assert( nullptr == nullptr, "");
123 static_assert(!(nullptr != nullptr), "")
    [all...]
enum-unscoped-nonexistent.cpp 20 static_assert(S<char>().f() == 1, "");
21 static_assert(S<int>().f() == 1, "");
26 static_assert(S<char>().g() == 1, ""); // expected-note {{here}} expected-error {{not an integral constant expression}} expected-note {{undefined}}
27 static_assert(S<short>().g() == 2, "");
28 static_assert(S<long>().g() == 8, "");
34 static_assert(b != 8, "");
35 static_assert(sizeof(c) != 8, "");
cxx0x-initializer-scalars.cpp 41 { const int a{}; static_assert(a == 0, ""); }
42 { const int a = {}; static_assert(a == 0, ""); }
43 { const int a{1}; static_assert(a == 1, ""); }
44 { const int a = {1}; static_assert(a == 1, ""); }
50 { if (const int a{1}) static_assert(a == 1, ""); }
51 { if (const int a = {1}) static_assert(a == 1, ""); }
80 static_assert(sizeof(overloaded({0})) == sizeof(one), "bad overload");
81 static_assert(sizeof(overloaded({0.0})) == sizeof(two), "bad overload");
114 static_assert(sizeof(f({0})) == sizeof(one), "bad overload");
underlying_type.cpp 18 static_assert(is_same_type<char, __underlying_type(f)>::value,
22 static_assert(is_same_type<int, __underlying_type(g)>::value,
26 static_assert(is_same_type<char, decltype(h)>::value,
34 static_assert(is_same_type<underlying_type<f>::type, char>::value,
42 static_assert(is_same_type<underlying_type<foo>::type, unsigned>::value,
generic-selection.cpp 13 static_assert(A<int>::id == 1, "fail");
14 static_assert(A<float>::id == 2, "fail");
15 static_assert(A<double, double>::id == 3, "fail");
44 static_assert(TypeMask<int, long, short>::result == 7, "fail");
45 static_assert(TypeMask<float, short>::result == 12, "fail");
46 static_assert(TypeMask<int, float, float>::result == 9, "fail");
  /external/clang/test/CodeGenCXX/
static-assert.cpp 3 static_assert(true, "");
6 static_assert(true, "");
  /external/clang/test/CXX/dcl.dcl/
p4-0x.cpp 16 static_assert(S(true), "");
17 static_assert(S(false), "not so fast"); // expected-error {{not so fast}}
18 static_assert(T(), "");
19 static_assert(U(), ""); // expected-error {{ambiguous}}
21 static_assert(false, L"\x14hi" "!" R"x(")x"); // expected-error {{static_assert failed L"\024hi!\""}}
  /external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/
p18.cpp 20 static_assert(is_same<decltype(((r))), float const&>::value,
22 static_assert(is_same<decltype(x), float>::value, "should be float");
23 static_assert(is_same<decltype((x)), const float&>::value,
25 static_assert(is_same<decltype(r), float&>::value, "should be float&");
26 static_assert(is_same<decltype(ir), int&>::value, "should be int&");
27 static_assert(is_same<decltype((ir)), int&>::value, "should be int&");
28 static_assert(is_same<decltype(irc), const int&>::value,
30 static_assert(is_same<decltype((irc)), const int&>::value,
36 static_assert(is_same<decltype(x), float>::value, "should be float");
37 static_assert(is_same<decltype((x)), float&>::value,
    [all...]
  /external/clang/test/CXX/class/
p6-0x.cpp 10 static_assert(__is_trivial(Trivial), "Trivial is not trivial");
11 static_assert(!__is_trivial(NonTrivial1), "NonTrivial1 is trivial");
12 static_assert(!__is_trivial(NonTrivial2), "NonTrivial2 is trivial");
13 static_assert(!__is_trivial(NonTrivial3), "NonTrivial3 is trivial");
14 static_assert(!__is_trivial(NonTrivial4), "NonTrivial4 is trivial");
15 static_assert(!__is_trivial(NonTrivial5), "NonTrivial5 is trivial");
30 static_assert(!__is_trivial(NonTrivial6), "NonTrivial6 is trivial");
  /external/clang/test/Sema/
static-assert.c 3 _Static_assert("foo", "string is nonzero"); // expected-error {{static_assert expression is not an integral constant expression}}
6 _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed "0 is nonzero"}}
10 _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed "0 is nonzero"}}
  /external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/
p4-cxx0x.cpp 18 static_assert(is_same<decltype(foo()), const int&&>::value, "");
19 static_assert(is_same<decltype(i), int>::value, "");
20 static_assert(is_same<decltype(a->x), double>::value, "");
21 static_assert(is_same<decltype((a->x)), const double&>::value, "");
22 static_assert(is_same<decltype(static_cast<int&&>(i)), int&&>::value, "");
  /external/clang/test/SemaTemplate/
instantiate-array.cpp 7 #define static_assert(__b, __m) \ macro
15 static_assert(sizeof(IntArray<10>) == sizeof(int) * 10, "Array size mismatch");
16 static_assert(sizeof(IntArray<1>) == sizeof(int) * 1, "Array size mismatch");
22 static_assert(sizeof(TenElementArray<int>) == sizeof(int) * 10, "Array size mismatch");
28 static_assert(sizeof(Array<int, 10>) == sizeof(int) * 10, "Array size mismatch");
  /external/clang/test/Lexer/
cxx0x_keyword.cpp 2 int static_assert; /* expected-error {{expected unqualified-id}} */ variable
  /external/clang/test/PCH/
cxx11-exception-spec.cpp 14 static_assert(!noexcept(f<false>()), "");
15 static_assert(noexcept(f<true>()), "");
  /external/clang/test/CXX/special/class.copy/
p15-0x.cpp 38 static_assert(noexcept(declval<X>()), "noexcept isn't working at all");
39 static_assert(noexcept(X(declval<X&>())), "copy constructor can't throw");
40 static_assert(noexcept(X(declval<X>())), "move constructor can't throw");
  /external/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/
p8-0x.cpp 42 static_assert(member_pointer_kind<int (X::*)(int)>::value == 1, "");
43 static_assert(member_pointer_kind<int (X::*)(int) &>::value == 2, "");
44 static_assert(member_pointer_kind<int (X::*)(int) &&>::value == 3, "");
45 static_assert(member_pointer_kind<int (X::*)(int) const>::value == 4, "");
46 static_assert(member_pointer_kind<int (X::*)(int) const&>::value == 5, "");
47 static_assert(member_pointer_kind<int (X::*)(int) const&&>::value == 6, "");
  /external/clang/test/CXX/over/over.oper/over.literal/
p7.cpp 7 static_assert(operator "" _a("foo") == 'f', "");

Completed in 424 milliseconds

1 2 3 4 5 6 7 8 910