I can create constexpr
std::array:
constexpr std::array<int,5> values {1,2,3,4,5};
It works fine. But I cannot create constexpr
vector:
constexpr std::vector<int> vec = {1,2,3,4,5};
It gives me an error:
the type 'const std::vector<int>' of constexpr variable 'vec' is not literal constexpr std::vector<int> vec = {1,2,3,4,5};