/external/clang/test/SemaObjCXX/ |
warn-missing-super.mm | 11 constexpr shared_ptr() {} 17 constexpr shared_ptr<int> dummy;
|
/external/clang/test/CXX/lex/lex.literal/lex.ext/ |
p8.cpp | 4 constexpr const char *operator "" _id(const char *p, size_t) { return p; } 5 constexpr const char *s = "foo"_id "bar" "baz"_id "quux"; 7 constexpr bool streq(const char *p, const char *q) { 12 constexpr const char *operator "" _trim(const char *p, size_t n) { 15 constexpr const char *t = " " " "_trim " foo";
|
/external/clang/test/SemaCXX/ |
discrim-union.cpp | 7 template<typename T> constexpr T &&forward(typename remove_reference<T>::type &t) noexcept { return static_cast<T&&>(t); } 8 template<typename T> constexpr T &&forward(typename remove_reference<T>::type &&t) noexcept { return static_cast<T&&>(t); } 9 template<typename T> constexpr typename remove_reference<T>::type &&move(T &&t) noexcept { return static_cast<typename remove_reference<T>::type&&>(t); } 31 constexpr either_impl(select<0>, T &&t) : val(move(t)) {} 34 constexpr either_impl(select<N>, U &&u) : rest(select<N-1>(), move(u)) {} 36 constexpr static unsigned index(type<T>) { return 0; } 38 constexpr static unsigned index(type<U> t) { 49 constexpr const T &get(select<0>) { return val; } 50 template<unsigned N> constexpr const decltype(static_cast<const rest_t&>(rest).get(select<N-1>{})) get(select<N>) { 60 constexpr a(U &&...u) : value{forward<U>(u)...} { [all...] |
cxx0x-class.cpp | 23 static const float x = 5.0f; // expected-warning {{requires 'constexpr'}} expected-note {{add 'constexpr'}} 24 static const float y = foo(); // expected-warning {{requires 'constexpr'}} expected-note {{add 'constexpr'}} 25 static constexpr float x2 = 5.0f; 26 static constexpr float y2 = foo(); // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr function 'foo'}}
|
constexpr-nqueens.cpp | 9 constexpr Board() : State(0), Failed(false) {} 10 constexpr Board(const Board &O) : State(O.State), Failed(O.Failed) {} 11 constexpr Board(uint64_t State, bool Failed = false) : 13 constexpr Board addQueen(int Row, int Col) { 16 constexpr int getQueenRow(int Col) { 19 constexpr bool ok(int Row, int Col) { 22 constexpr bool okRecurse(int Row, int Col, int CheckCol) { 29 constexpr bool at(int Row, int Col) { 32 constexpr bool check(const char *, int=0, int=0); 35 constexpr Board buildBoardRecurse(int N, int Col, const Board &B) [all...] |
constexpr-turing.cpp | 4 // A direct proof that constexpr is Turing-complete, once DR1454 is implemented. 18 constexpr Tape() : l(0), val(false), r(0) {} 19 constexpr Tape(const Tape &old, bool write) : 21 constexpr Tape(const Tape &old, Dir dir) : 30 constexpr Tape update(const Tape &old, bool write) { return Tape(old, write); } 31 constexpr Tape move(const Tape &old, Dir dir) { return Tape(old, dir); } 35 constexpr unsigned run(const State *tm, const Tape &tape, unsigned state) { 43 constexpr State bb3[] = { 51 constexpr State bb4[] = {
|
cxx11-user-defined-literals.cpp | 9 constexpr LitKind operator"" _kind(char p) { return LitKind::Char; } 10 constexpr LitKind operator"" _kind(wchar_t p) { return LitKind::WideChar; } 11 constexpr LitKind operator"" _kind(char16_t p) { return LitKind::Char16; } 12 constexpr LitKind operator"" _kind(char32_t p) { return LitKind::Char32; } 13 constexpr LitKind operator"" _kind(const char *p, size_t n) { return LitKind::CharStr; } 14 constexpr LitKind operator"" _kind(const wchar_t *p, size_t n) { return LitKind::WideStr; } 15 constexpr LitKind operator"" _kind(const char16_t *p, size_t n) { return LitKind::Char16Str; } 16 constexpr LitKind operator"" _kind(const char32_t *p, size_t n) { return LitKind::Char32Str; } 17 constexpr LitKind operator"" _kind(unsigned long long n) { return LitKind::Integer; } 18 constexpr LitKind operator"" _kind(long double n) { return LitKind::Floating; [all...] |
/external/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/ |
p2.cpp | 3 // An explicitly-defaulted function may be declared constexpr only if it would 4 // have been implicitly declared as constexpr. 6 constexpr S1() = default; // expected-error {{defaulted definition of default constructor is not constexpr}} 7 constexpr S1(const S1&) = default; 8 constexpr S1(S1&&) = default; 9 constexpr S1 &operator=(const S1&) = default; // expected-error {{explicitly-defaulted copy assignment operator may not have}} 10 constexpr S1 &operator=(S1&&) = default; // expected-error {{explicitly-defaulted move assignment operator may not have}} 11 constexpr ~S1() = default; // expected-error {{destructor cannot be marked constexpr}} [all...] |
/external/clang/test/CXX/class/class.union/ |
p2-0x.cpp | 6 static constexpr int k1 = 0; 9 static constexpr double k4 = k2; 10 static const double k5 = k4; // expected-error {{requires 'constexpr' specifier}} expected-note {{add 'constexpr'}} 14 constexpr int U1::k1; 15 constexpr int U1::k2; 27 template<typename T> constexpr int U2<T>::k1 = sizeof(U2<T>);
|
/external/clang/test/CXX/expr/expr.const/ |
p5-0x.cpp | 9 constexpr A(int i) : val(i) { } 10 constexpr operator int() { return val; } 11 constexpr operator long() { return 43; } 16 constexpr A a = 42; 23 constexpr OK() {} 24 constexpr operator int() { return 8; } 25 } constexpr ok; 28 constexpr Explicit() {} 29 constexpr explicit operator int() { return 4; } // expected-note 4{{here}} 30 } constexpr expl [all...] |
/external/clang/test/CXX/stmt.stmt/stmt.select/stmt.switch/ |
p2-0x.cpp | 5 constexpr Value(int n) : n(n) {} 6 constexpr operator short() { return n; } 11 constexpr operator E() { return E0; } 14 constexpr short s = Alt();
|
/external/compiler-rt/lib/asan/lit_tests/Helpers/ |
initialization-nobug-extra.cc | 7 // Constexpr:
|
/external/llvm/test/Assembler/ |
2003-05-21-MalformedShiftCrash.ll | 3 ; RUN: grep "constexpr requires integer operands" %t
|
/external/clang/test/CodeCompletion/ |
constexpr.cpp | 3 // PR14381: need constexpr function bodies always, even if code-completing. 8 constexpr int f() {
|
/external/clang/test/Lexer/ |
cxx0x_keyword_as_cxx98.cpp | 3 #define constexpr const macro 4 constexpr int x = 0; 5 #undef constexpr macro 14 int CONCAT(constexpr,ession); 31 int constexpr; // expected-warning {{'constexpr' is a keyword in C++11}} variable
|
/external/clang/test/SemaTemplate/ |
instantiate-self.cpp | 20 friend constexpr int operator+(int, C) { return 4; } 50 // FIXME: PR12298: Recursive constexpr function template instantiation leads to 55 constexpr T f(T k) { return g(k); } 56 constexpr T g(T k) { 61 constexpr int x = A<int>().f(5); 65 template<typename T> constexpr T f(T); 66 template<typename T> constexpr T g(T t) { 70 template<typename T> constexpr T f(T t) { 79 template<typename T> constexpr T g(T t) { 82 template<typename T> constexpr T f(T t) [all...] |
/prebuilts/ndk/8/sources/cxx-stl/gnu-libstdc++/4.7/include/ |
cmath | 563 constexpr int 568 constexpr int 573 constexpr int 579 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 584 constexpr bool 588 constexpr bool 592 constexpr bool 597 constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 602 constexpr bool 606 constexpr boo [all...] |
ratio | 125 static constexpr uintmax_t __lo = __lo1 + __lo2; 126 static constexpr uintmax_t __hi = (__hi1 + __hi2 + 136 static constexpr uintmax_t __lo = __lo1 - __lo2; 137 static constexpr uintmax_t __hi = (__hi1 - __hi2 - 146 static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 147 static constexpr uintmax_t __x0 = __x % __c; 148 static constexpr uintmax_t __x1 = __x / __c; 149 static constexpr uintmax_t __y0 = __y % __c; 150 static constexpr uintmax_t __y1 = __y / __c; 151 static constexpr uintmax_t __x0y0 = __x0 * __y0 [all...] |
/ndk/sources/cxx-stl/llvm-libc++/test/utilities/time/time.duration/time.duration.nonmember/ |
op_-.pass.cpp | 15 // constexpr 50 constexpr std::chrono::seconds s1(3); 51 constexpr std::chrono::seconds s2(5); 52 constexpr std::chrono::seconds r = s1 - s2; 56 constexpr std::chrono::seconds s1(3); 57 constexpr std::chrono::microseconds s2(5); 58 constexpr std::chrono::microseconds r = s1 - s2; 62 constexpr std::chrono::duration<int, std::ratio<2, 3> > s1(3); 63 constexpr std::chrono::duration<int, std::ratio<3, 5> > s2(5); 64 constexpr std::chrono::duration<int, std::ratio<1, 15> > r = s1 - s2 [all...] |
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/i686-linux/include/c++/4.6.x-google/bits/ |
regex_error.h | 63 static constexpr error_type error_collate(_S_error_collate); 66 static constexpr error_type error_ctype(_S_error_ctype); 72 static constexpr error_type error_escape(_S_error_escape); 75 static constexpr error_type error_backref(_S_error_backref); 78 static constexpr error_type error_brack(_S_error_brack); 81 static constexpr error_type error_paren(_S_error_paren); 84 static constexpr error_type error_brace(_S_error_brace); 87 static constexpr error_type error_badbrace(_S_error_badbrace); 93 static constexpr error_type error_range(_S_error_range); 99 static constexpr error_type error_space(_S_error_space) [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/x86_64-linux/include/c++/4.6.x-google/bits/ |
regex_error.h | 63 static constexpr error_type error_collate(_S_error_collate); 66 static constexpr error_type error_ctype(_S_error_ctype); 72 static constexpr error_type error_escape(_S_error_escape); 75 static constexpr error_type error_backref(_S_error_backref); 78 static constexpr error_type error_brack(_S_error_brack); 81 static constexpr error_type error_paren(_S_error_paren); 84 static constexpr error_type error_brace(_S_error_brace); 87 static constexpr error_type error_badbrace(_S_error_badbrace); 93 static constexpr error_type error_range(_S_error_range); 99 static constexpr error_type error_space(_S_error_space) [all...] |
/prebuilts/ndk/8/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/ |
regex_error.h | 63 static constexpr error_type error_collate(_S_error_collate); 66 static constexpr error_type error_ctype(_S_error_ctype); 72 static constexpr error_type error_escape(_S_error_escape); 75 static constexpr error_type error_backref(_S_error_backref); 78 static constexpr error_type error_brack(_S_error_brack); 81 static constexpr error_type error_paren(_S_error_paren); 84 static constexpr error_type error_brace(_S_error_brace); 87 static constexpr error_type error_badbrace(_S_error_badbrace); 93 static constexpr error_type error_range(_S_error_range); 99 static constexpr error_type error_space(_S_error_space) [all...] |
/prebuilts/ndk/8/sources/cxx-stl/gnu-libstdc++/4.7/include/bits/ |
regex_error.h | 63 static constexpr error_type error_collate(_S_error_collate); 66 static constexpr error_type error_ctype(_S_error_ctype); 72 static constexpr error_type error_escape(_S_error_escape); 75 static constexpr error_type error_backref(_S_error_backref); 78 static constexpr error_type error_brack(_S_error_brack); 81 static constexpr error_type error_paren(_S_error_paren); 84 static constexpr error_type error_brace(_S_error_brace); 87 static constexpr error_type error_badbrace(_S_error_badbrace); 93 static constexpr error_type error_range(_S_error_range); 99 static constexpr error_type error_space(_S_error_space) [all...] |
/external/clang/test/CodeGenCXX/ |
const-init-cxx11.cpp | 9 constexpr U(int x) : x(x) {} 10 constexpr U(const char *y) : y(y) {} 15 constexpr A(int n, double d, int x) : n(n), d(d), u(x) {} 16 constexpr A(int n, double d, const char *y) : n(n), d(d), u(y) {} 20 extern constexpr A a(1, 2.0, 3); 23 extern constexpr A b(4, 5, "hello"); 38 constexpr C() : c(0) {} 46 constexpr D() : d(5) {} 73 struct Test : Ts... { constexpr Test() : Ts()..., n(5) {} int n; }; 77 extern constexpr Test1 t1 = Test1() [all...] |
/external/clang/test/CXX/temp/temp.spec/temp.explicit/ |
p1-0x.cpp | 12 constexpr int f() { return 0; } 15 template constexpr int Y<int>::f() const; // expected-error{{explicit instantiation cannot be 'constexpr'}}
|