Searched refs:is_constant_evaluated (Results 1 – 11 of 11) sorted by relevance
8 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function32 template <bool V, bool Default = std::is_constant_evaluated()>47 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()55 …case std::is_constant_evaluated() + __builtin_is_constant_evaluated(): // expected-note {{previous… in test_case_stmt()63 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()67 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()72 if (!std::is_constant_evaluated()) in require_constexpr()79 …auto *x = new int[std::is_constant_evaluated() ? 1 : TooLarge]; // expected-error {{array is … in test_new_expr()80 auto *x2 = new int[std::is_constant_evaluated() ? TooLarge : 1]; // OK in test_new_expr()81 …auto *y = new int[1][std::is_constant_evaluated() ? TooLarge : 1]{}; // expected-error {{array is … in test_new_expr()[all …]
4 constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function10 …if constexpr (std::is_constant_evaluated()) // expected-warning {{'std::is_constant_evaluated' wil… in fn1()17 …if constexpr (!std::is_constant_evaluated()) // expected-warning {{'std::is_constant_evaluated' wi… in fn2()24 …if constexpr (std::is_constant_evaluated() == false) // expected-warning {{'std::is_constant_evalu… in fn3()45 if (std::is_constant_evaluated()) in nowarn1()
17 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function35 …const int n = __builtin_is_constant_evaluated() && std::is_constant_evaluated() ? 13 : 17; // n ==… in f()75 char x1[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 101 : 1]; in test_arr_expr()78 char x2[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 42 : RANDU()]; in test_arr_expr()82 char x3[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? RANDU() : 13]; in test_arr_expr()88 new char[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? 1 : 17]; in test_new_arr_expr()95 const bool n = __builtin_is_constant_evaluated() && std::is_constant_evaluated(); in test_constant_initialized_local()106 if (std::is_constant_evaluated()) { in test_ir_constant_fold()111 std::is_constant_evaluated() ? BOOM() : OK(); in test_ir_constant_fold()
43 ASSERT_SAME_TYPE(decltype(std::is_constant_evaluated()), bool); in main()44 ASSERT_NOEXCEPT(std::is_constant_evaluated()); in main()45 constexpr bool p = std::is_constant_evaluated(); in main()51 static_assert(std::is_constant_evaluated(), ""); in main()52 bool p = std::is_constant_evaluated(); in main()54 ASSERT_SAME_TYPE(InTemplate<std::is_constant_evaluated()>, InTemplate<true>); in main()55 static int local_static = std::is_constant_evaluated() ? 42 : -1; in main()
23 bool b = std::is_constant_evaluated(); in main()26 static_assert(!std::is_constant_evaluated(), ""); in main()
120 if (!std::is_constant_evaluated()) in test()
143 if (!std::is_constant_evaluated()) in test()
160 if (!std::is_constant_evaluated()) in test()
189 if (!std::is_constant_evaluated()) in test()
59 "`P0595R2 <https://wg21.link/P0595R2>`__","CWG","P0595R2 std::is_constant_evaluated()","San Diego",…
4308 inline constexpr bool is_constant_evaluated() noexcept {