StackOverflow Questions for Tag: constinit

Fedor
Fedor

Reputation: 20997

Structured binding declaration cannot be `constinit`

Score: 3

Views: 90

Answers: 1

Read More
Ijaz Ahmad
Ijaz Ahmad

Reputation: 305

Why can I define a std::string instance that is constinit? Isn't constinit forbidden if an object requires dynamic initialization?

Score: 20

Views: 1703

Answers: 2

Read More
Filipp
Filipp

Reputation: 2040

How I place a global variable at a compile-time known address?

Score: 4

Views: 911

Answers: 3

Read More
Rudolf Lovrenčić
Rudolf Lovrenčić

Reputation: 174

Returning an array from a consteval function where size of an array is a function argument

Score: 1

Views: 66

Answers: 0

Read More
Oersted
Oersted

Reputation: 2464

inconsistency between compilers when getting a `constinit` reference on a template parameter object

Score: 1

Views: 48

Answers: 1

Read More
GKxx
GKxx

Reputation: 363

Static-storage variable initialized by calling constexpr function with constexpr arguments

Score: 1

Views: 60

Answers: 1

Read More
seanlego23
seanlego23

Reputation: 33

Static data member of template class type: constexpr vs. const constinit

Score: 2

Views: 138

Answers: 1

Read More
YePhIcK
YePhIcK

Reputation: 5856

string literals as template arguments forces code duplication and verbosity

Score: 1

Views: 238

Answers: 1

Read More
glades
glades

Reputation: 4737

Branch with if constexpr() on constinit variables?

Score: 0

Views: 35

Answers: 0

Read More
ledonter
ledonter

Reputation: 1699

Examples of constinit declaration not reachable at the point of the initializing declaration

Score: 1

Views: 130

Answers: 1

Read More
Goswin von Brederlow
Goswin von Brederlow

Reputation: 12322

Why does constinit allow UB?

Score: 4

Views: 258

Answers: 1

Read More
dVNE
dVNE

Reputation: 161

Initialize a pointer with constinit

Score: 0

Views: 229

Answers: 1

Read More
Acorn
Acorn

Reputation: 26066

What is `constinit` in C++20?

Score: 105

Views: 20236

Answers: 2

Read More
Klaus
Klaus

Reputation: 25593

how to guarantee initilization of a stack variable with a compile time constant

Score: 2

Views: 311

Answers: 2

Read More
Brotcrunsher
Brotcrunsher

Reputation: 2254

In which practical case is "const constinit" useful?

Score: 1

Views: 266

Answers: 2

Read More
HowP
HowP

Reputation: 41

static_assert fails while using constinit const. Confusion in constinit, constinit const, constexpr, const, nonconst variables

Score: 0

Views: 404

Answers: 3

Read More
Helmut Zeisel
Helmut Zeisel

Reputation: 406

When is the destructor of a constinit object called?

Score: 8

Views: 220

Answers: 1

Read More
ashubhatt
ashubhatt

Reputation: 21

When to use constinit and consteval?

Score: 2

Views: 1386

Answers: 0

Read More
xmllmx
xmllmx

Reputation: 42215

What's the real difference between "constinit" and "constexpr"?

Score: 7

Views: 1081

Answers: 1

Read More
Amir Kirsh
Amir Kirsh

Reputation: 13752

Can C++20 `constinit` waive the need for nifty counter idiom?

Score: 4

Views: 236

Answers: 1

Read More
PreviousPage 1Next