Top "Stdarray" questions

std::array is a container that encapsulates constant size arrays in C++.

Default initialization of std::array?

With C++11 std::array, do I have the guarantee that the syntax std::array<T, N> x; will …

c++11 initialization default-constructor stdarray
Passing a std::array of unknown size to a function

In C++11, how would I go about writing a function (or method) that takes a std::array of known type …

c++ c++11 stdarray
std::array vs array performance

If I want to build a very simple array like int myArray[3] = {1,2,3}; Should I use std::array instead ? std::array&…

c++ c++11 stdarray
Why does std::array not have an constructor that takes a value for the array to be filled with?

Is the absence of std::array<T,size>::array(const T& value); an oversight? It seems mighty …

c++ c++11 stdarray
Call to implicitly-deleted default constructor

I get the error message Call to implicitly-deleted default constructor of 'std::array' when I try to compile my C++ …

c++ stdarray
How to create std::array with initialization list without providing size directly

How can I make a3 compile? int main() { int a1[] = { 1, 2, 3 }; std::array<int, 3> a2 = { 1, 2, 3 }; std::array<int&…

c++ initialization stdarray
How do you declare a pointer to a C++11 std::array?

Depending on a variable, I need to select the SeedPositions32 or SeedPositions16 array for further use. I thought a pointer …

c++ pointers c++11 stdarray
Implicit instantiation of undefined template 'std::__1::array<int, 3>'

I copy and pasted this exact code, found here into my IDE, and got an error, I don't understand why …

c++ arrays include stdarray
How should I brace-initialize an std::array of std::pairs?

std::array<std::pair<int, int>, 2> ids = { { 0, 1 }, { 1, 2 } }; VS2013 error: error C2440: 'initializing' : cannot convert from 'int' …

c++ c++11 std-pair stdarray list-initialization
Extract range of elements from char array into string

I want to extract a range of elements from the beginning of a char array and put them into a …

c++ arrays string c++11 stdarray