StackOverflow Questions for Tag: initializer-list

Zebrafish
Zebrafish

Reputation: 14270

backing array for 'std::initializer_list' member '...' is a temporary object whose lifetime is shorter than the lifetime of the constructed object

Score: 3

Views: 94

Answers: 0

Read More
user2365346
user2365346

Reputation: 515

Cannot convert <brace-enclosed initializer list> to class

Score: 1

Views: 98

Answers: 1

Read More
HeliumHydride
HeliumHydride

Reputation: 81

Allowing a function to accept braced initializer lists without another overload

Score: 1

Views: 108

Answers: 1

Read More
4ZM
4ZM

Reputation: 1513

Why can't a T&& template parameter be deduced from an initializer list?

Score: 50

Views: 15782

Answers: 4

Read More
Peter Lee
Peter Lee

Reputation: 13839

Trying to Understand the Initialization of C++ STL Containers

Score: 5

Views: 618

Answers: 1

Read More
Josh Shields
Josh Shields

Reputation: 113

Why do std::vector<T> v{1, 2, 3} and std::vector<T> v = {1, 2, 3} call different constructors, when T implicitly converts from int?

Score: 9

Views: 520

Answers: 1

Read More
Damir Tenishev
Damir Tenishev

Reputation: 3402

How to initialize structures using fields names?

Score: -1

Views: 82

Answers: 1

Read More
inkooboo
inkooboo

Reputation: 2954

C++11 initializer_list error

Score: 0

Views: 287

Answers: 2

Read More
Osama Ahmad
Osama Ahmad

Reputation: 2096

How to deduce the two dimensions of a compile-time matrix class with an initializer_list constructor?

Score: 3

Views: 76

Answers: 1

Read More
xmllmx
xmllmx

Reputation: 42379

How to use default member initializer if `std::initializer_list` ctor exists in C++11?

Score: 0

Views: 89

Answers: 1

Read More
Pootis Spencer
Pootis Spencer

Reputation: 101

Error when calling std::views::join on std::initializer_list of vectors

Score: 0

Views: 73

Answers: 1

Read More
TheVTM
TheVTM

Reputation: 1590

Initialization Lists in Const Fields dont generate operator=

Score: 0

Views: 147

Answers: 2

Read More
xmllmx
xmllmx

Reputation: 42379

Does the C++11 standard guarantee the memory layout of initializer_list's objects are cross-compiler compatible?

Score: 2

Views: 256

Answers: 1

Read More
LeDYoM
LeDYoM

Reputation: 980

Should a constructor with a std::initializer_list be explicit?

Score: 0

Views: 59

Answers: 0

Read More
graphitemaster
graphitemaster

Reputation: 3723

C++11 library features dependent on compiler specific proxys

Score: 12

Views: 456

Answers: 2

Read More
MarkP
MarkP

Reputation: 4288

Initializer list for objects with default constructor

Score: 13

Views: 22320

Answers: 4

Read More
Kobe Bryant
Kobe Bryant

Reputation: 3

How can I initialize a random struct type using the template function?

Score: 0

Views: 115

Answers: 1

Read More
michael3.14
michael3.14

Reputation: 333

Overload resolution of a pointer and a container with pointers

Score: 14

Views: 1444

Answers: 3

Read More
Dima Lisovenko
Dima Lisovenko

Reputation: 19

Cpp compiler chooses the wrong constructor

Score: 0

Views: 122

Answers: 1

Read More
Steve
Steve

Reputation: 859

How to initialize an array of structs containing union in C++11?

Score: 0

Views: 56

Answers: 1

Read More
PreviousPage 1Next