0

Imagine I have to instantiate a bunch of values at compile time that will be used to instantiate a class template, for example:

constexpr static std::array ints { 1, 2, 3, 4, 5 }; constexpr static std::array bools { true, false, true, false }; template<std::array, std::array> class MyClass; 

If I would want to optimize the usage of the MyClass template with regards to compile time, would it be better for me to use constexpr static arrays or constexpr arrays? Is there a difference in output code size or compile time depending on whether or not the arrays are declared static?

3

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.