HomeSort by relevance Sort by last modified time
    Searched refs:constexpr (Results 1 - 25 of 282) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/
p9.cpp 3 // A constexpr specifier used in an object declaration declares the object as
5 constexpr int a = 0;
9 constexpr int *b = &i;
12 constexpr int &c = i;
15 constexpr int (*d)(int) = 0;
18 // A variable declaration which uses the constexpr specifier shall have an
20 constexpr int ni1; // expected-error {{default initialization of an object of const type 'const int'}}
21 constexpr struct C { C(); } ni2; // expected-error {{cannot have non-literal type 'const struct C'}} expected-note 3{{has no constexpr constructors}}
22 constexpr double &ni3; // expected-error {{declaration of reference variable 'ni3' requires an initializer}
    [all...]
p1.cpp 11 constexpr int i1 = 0;
12 constexpr int f1() { return 0; }
14 constexpr static int mi1 = 0;
17 constexpr int s1::mi2 = 0;
21 constexpr extern int i2; // expected-error {{constexpr variable declaration must be a definition}}
23 constexpr notlit nl1; // expected-error {{constexpr variable cannot have non-literal type 'const notlit'}}
25 void f2(constexpr int i) {} // expected-error {{function parameter cannot be constexpr}}
42 class C2 {} constexpr; \/\/ expected-error {{class cannot be marked constexpr}} variable in typeref:class:C2
43 struct S2 {} constexpr; \/\/ expected-error {{struct cannot be marked constexpr}} variable in typeref:struct:S2
44 union U2 {} constexpr; \/\/ expected-error {{union cannot be marked constexpr}} variable in typeref:union:U2
45 enum E2 {} constexpr; \/\/ expected-error {{enum cannot be marked constexpr}} variable in typeref:enum:E2
    [all...]
p2.cpp 3 // constexpr functions and constexpr constructors are implicitly inline.
5 constexpr S(int n);
6 constexpr int g();
10 constexpr S::S(int n) : n(n) {}
12 constexpr S f(S s) {
16 constexpr int S::g() {
p3.cpp 12 struct NonLiteral { // expected-note 3{{no constexpr constructors}}
17 constexpr Literal() {}
28 // The definition of a constexpr function shall satisfy the following
31 constexpr T();
32 constexpr int f() const; // expected-error {{non-literal type 'T' cannot have constexpr members}}
35 virtual constexpr int ExplicitlyVirtual() const { return 0; } // expected-error {{virtual function cannot be constexpr}}
37 constexpr int ImplicitlyVirtual() const { return 0; } // expected-error {{virtual function cannot be constexpr}}
    [all...]
p6.cpp 17 constexpr Literal() {}
27 constexpr int ImplicitlyVirtual() const { return 0; }
30 constexpr int a = ImplicitVirtualFromDependentBase<S>().ImplicitlyVirtual(); // expected-error {{constant expression}} expected-note {{cannot evaluate virtual function call}}
31 constexpr int b = ImplicitVirtualFromDependentBase<T>().ImplicitlyVirtual(); // ok
32 constexpr int c = ImplicitVirtualFromDependentBase<S>().ImplicitVirtualFromDependentBase<S>::ImplicitlyVirtual();
35 constexpr R F() const { return 0; }
37 constexpr int d = ConstexprMember<int>().F(); // ok
38 constexpr int e = ConstexprMember<NonLiteral>().F(); // expected-error {{constant expression}}
41 constexpr ConstexprCtor(P...) {}
43 constexpr ConstexprCtor<> f1() { return {}; } // o
    [all...]
p8.cpp 6 constexpr int f(); // expected-warning {{C++1y}}
7 constexpr int g() const;
8 constexpr int h(); // expected-warning {{C++1y}}
10 static constexpr int Sf();
11 /*static*/ constexpr void *operator new(size_t) noexcept;
12 template<typename T> constexpr T tm(); // expected-warning {{C++1y}}
13 template<typename T> static constexpr T ts();
28 constexpr int S::f() const { return 0; }
29 constexpr int S::g() { return 1; } // expected-warning {{C++1y}}
30 constexpr int S::h() { return 0; } // expected-warning {{C++1y}
    [all...]
  /external/clang/test/Parser/
cxx11-type-specifier.cpp 6 operator constexpr int(); // expected-error{{type name does not allow constexpr}}
12 (void) new constexpr int; // expected-error{{type name does not allow constexpr}}
13 } catch (constexpr int) { // expected-error{{type name does not allow constexpr}}
  /external/clang/test/SemaCXX/
constexpr-depth.cpp 5 constexpr int depth(int n) { return n > 1 ? depth(n-1) : 0; } // expected-note {{exceeded maximum depth}} expected-note +{{}}
7 constexpr int kBad = depth(MAX + 1); // expected-error {{must be initialized by a constant expression}} expected-note {{in call to 'depth(}}
8 constexpr int kGood = depth(MAX);
cxx1y-constexpr-not-const.cpp 5 constexpr int f(); // @5
14 // expected-error@6 {{non-constexpr declaration of 'f' follows constexpr declaration}}
17 // expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}}
cxx0x-constexpr-const.cpp 3 constexpr int x = 1;
4 constexpr int id(int x) { return x; }
constexpr-factorial.cpp 3 constexpr unsigned oddfac(unsigned n) {
6 constexpr unsigned k = oddfac(123);
constexpr-value-init.cpp 4 constexpr A() : a(b + 1), b(a + 1) {} // expected-note {{outside its lifetime}}
12 constexpr A a; // ok, zero initialization preceeds static initialization
14 constexpr A a; // expected-error {{constant expression}} expected-note {{in call to 'A()'}}
17 constexpr B b1; // expected-error {{requires a user-provided default constructor}}
18 constexpr B b2 = B(); // ok
26 constexpr C c1; // expected-error {{requires a user-provided default constructor}}
27 constexpr C c2 = C(); // ok
28 constexpr D d1; // expected-error {{requires a user-provided default constructor}}
29 constexpr D d2 = D(); // ok with DR1452
35 constexpr Z() : V() {
    [all...]
  /external/clang/test/FixIt/
fixit-cxx1y-compat.cpp 10 constexpr int &f(); // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}}
  /prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/i686-linux/include/c++/4.6.x-google/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/x86_64-linux/include/c++/4.6.x-google/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/ndk/8/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/ndk/8/sources/cxx-stl/gnu-libstdc++/4.7/include/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.7/include/bits/
regex_constants.h 79 static constexpr syntax_option_type icase = 1 << _S_icase;
86 static constexpr syntax_option_type nosubs = 1 << _S_nosubs;
94 static constexpr syntax_option_type optimize = 1 << _S_optimize;
100 static constexpr syntax_option_type collate = 1 << _S_collate;
110 static constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
119 static constexpr syntax_option_type basic = 1 << _S_basic;
127 static constexpr syntax_option_type extended = 1 << _S_extended;
137 static constexpr syntax_option_type awk = 1 << _S_awk;
145 static constexpr syntax_option_type grep = 1 << _S_grep;
153 static constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/
regex_constants.h 86 constexpr syntax_option_type icase = 1 << _S_icase;
93 constexpr syntax_option_type nosubs = 1 << _S_nosubs;
101 constexpr syntax_option_type optimize = 1 << _S_optimize;
107 constexpr syntax_option_type collate = 1 << _S_collate;
117 constexpr syntax_option_type ECMAScript = 1 << _S_ECMAScript;
126 constexpr syntax_option_type basic = 1 << _S_basic;
134 constexpr syntax_option_type extended = 1 << _S_extended;
144 constexpr syntax_option_type awk = 1 << _S_awk;
152 constexpr syntax_option_type grep = 1 << _S_grep;
160 constexpr syntax_option_type egrep = 1 << _S_egrep
    [all...]
  /external/clang/test/CXX/basic/basic.types/
p10.cpp 9 constexpr void f() {}
15 constexpr int f1(double) { return 0; }
19 constexpr int f2(S &) { return 0; }
24 static constexpr BeingDefined& t = beingdefined;
34 constexpr Incomplete incomplete = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete'}} expected-note {{incomplete type 'const Incomplete' is not a literal type}}
35 constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'Incomplete const[]'}} expected-note {{incomplete type 'Incomplete const[]' is not a literal type}}
36 constexpr ClassTemp<int> classtemplate = {};
37 constexpr ClassTemp<int> classtemplate2[] = {}
    [all...]
  /external/clang/test/CXX/class/class.static/class.static.data/
p3.cpp 3 struct NonLit { // expected-note 3{{no constexpr constructors}}
8 static constexpr int a = 0;
9 static constexpr int b; // expected-error {{declaration of constexpr static data member 'b' requires an initializer}}
11 static constexpr int c = 0;
15 static constexpr double e = 0.0; // ok
16 static const double f = 0.0; // expected-error {{requires 'constexpr' specifier}} expected-note {{add 'constexpr'}}
17 static char *const g = 0; // expected-error {{requires 'constexpr' specifier}}
21 constexpr int S::a
    [all...]
  /external/clang/test/CXX/dcl.dcl/
p4-0x.cpp 4 constexpr S(bool b) : b(b) {}
5 constexpr explicit operator bool() const { return b; }
9 constexpr operator int() const { return 1; }
12 constexpr operator int() const { return 1; } // expected-note {{candidate}}
13 constexpr operator long() const { return 0; } // expected-note {{candidate}}
  /external/clang/test/CXX/expr/expr.const/
p5-0x.cpp 9 constexpr A(int i) : val(i) { }
10 constexpr operator int() const { return val; }
11 constexpr operator long() const { return 43; }
16 constexpr A a = 42;
23 constexpr OK() {}
24 constexpr operator int() const { return 8; }
25 } constexpr ok;
28 constexpr Explicit() {}
29 constexpr explicit operator int() const { return 4; } // expected-note 4{{here}}
30 } constexpr expl
    [all...]
p2-0x.cpp 7 // expression, function invocation substitution (7.1.5 [dcl.constexpr])
8 // replaces each occurrence of this in a constexpr member function with a
20 // - an invocation of a function other than a constexpr constructor for a
21 // literal class or a constexpr function [ Note: Overload resolution (13.3)
25 int n : f(); // expected-error {{constant expression}} expected-note {{non-constexpr function 'f' cannot be used in a constant expression}}
28 constexpr NonConstexpr2(); // expected-note {{here}}
40 int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr4' cannot be used in a constant expression}}
43 // - an invocation of an undefined constexpr function or an undefined
44 // constexpr constructor;
46 constexpr UndefinedConstexpr()
    [all...]

Completed in 752 milliseconds

1 2 3 4 5 6 7 8 91011>>