Cannot create constexpr std::vector

前端 未结 3 1400
别跟我提以往
别跟我提以往 2021-01-01 10:21

I can create constexpr std::array:

constexpr std::array values {1,2,3,4,5};

It works fine. But I cannot create

3条回答
  •  渐次进展
    2021-01-01 10:54

    AFAIK The initlializer_list constructor of std::vector<> is not declared constexpr.

提交回复
热议问题