StackOverflow Questions for Tag: constexpr

tramis
tramis

Reputation: 21

Why constructor of template struct cannot be used if it's declared inside a class?

Score: 2

Views: 61

Answers: 0

Read More
Setu
Setu

Reputation: 980

Mutable static variables in consteval contxt

Score: -1

Views: 61

Answers: 0

Read More
Redim
Redim

Reputation: 49

Is there any way to mark a function parameter as constexpr?

Score: 4

Views: 129

Answers: 2

Read More
HolyBlackCat
HolyBlackCat

Reputation: 96791

How to check that a function result is constexpr even when the argument is not?

Score: 5

Views: 111

Answers: 1

Read More
Romà Pagès
Romà Pagès

Reputation: 11

check a c string at compile time in c++

Score: 1

Views: 29

Answers: 0

Read More
Crutch
Crutch

Reputation: 33

How can a sprintf-like function in C++20/23 verify that the number of format specifiers matches the number of provided arguments at compile time?

Score: 3

Views: 129

Answers: 1

Read More
AR-47
AR-47

Reputation: 23

Stroustrup book constexpr example does not compile in VS C++ 2022

Score: 2

Views: 91

Answers: 2

Read More
ocebe
ocebe

Reputation: 1

Why can't std::vector<std::jthread>> can't be initialized via an std::initializer_list?

Score: -1

Views: 58

Answers: 1

Read More
learnvst
learnvst

Reputation: 16193

Compile-time evaluation of constexpr functions in debug mode

Score: 3

Views: 898

Answers: 1

Read More
Antonio
Antonio

Reputation: 651

C++ code that compiles in gcc 9.3 but not in gcc 10.2

Score: 2

Views: 367

Answers: 3

Read More
AndreasL
AndreasL

Reputation: 49

C++ static constexpr template function in struct

Score: 4

Views: 62

Answers: 0

Read More
Matyro
Matyro

Reputation: 141

Single type compile time list: concat with clang

Score: 0

Views: 49

Answers: 1

Read More
datenwolf
datenwolf

Reputation: 162297

std::bit_cast equivalent for CUDA device side code?

Score: 1

Views: 288

Answers: 2

Read More
Ted Klein Bergman
Ted Klein Bergman

Reputation: 9766

Emulating if __name__ == __main__ in c++ causes error "function-like macro is not defined"

Score: 1

Views: 2389

Answers: 3

Read More
Stefano Bellotti
Stefano Bellotti

Reputation: 125

Defining string literal constants once both as char const* and wchar const*

Score: 7

Views: 925

Answers: 3

Read More
bleh
bleh

Reputation: 1

Printing std::source_location attributes in __cyg_profile_func_enter causes segfault?

Score: 0

Views: 8

Answers: 0

Read More
tower120
tower120

Reputation: 5265

Can't use function parameter of a constexpr function in a constant expression

Score: 23

Views: 36563

Answers: 3

Read More
Fedor
Fedor

Reputation: 21307

Explicitly constexpr default comparisons

Score: 1

Views: 157

Answers: 1

Read More
ligazetom
ligazetom

Reputation: 153

Can I wrap static_assert in different function?

Score: 0

Views: 42

Answers: 0

Read More
user28442838
user28442838

Reputation: 41

Error when binding a constexpr reference to variable of different type

Score: 3

Views: 96

Answers: 1

Read More
PreviousPage 1Next