constexpr
C++, initialization of constexpr fields
Please tell me, is it possible to initialize the constexpr member not in the header, but in the implementation file?
For exa ... ject
{
public:
constexpr size_t VALUE;
};
// cpp
constexpr Object::VALUE = 1U;
If possible, how?
If not, why not?
C++ 14 constexpr std::array
I'm studying constexpr.
I can't understand why the compiler doesn't treat one of the expressions as a constant, because it fi ... 't I know why it doesn't work.
I am interested in the gcc 5.4.0 and gcc 6.4.0 compilers.
clang does not compile this either.