namespace ABC
{
constexpr static const std::uint8_t CLASS_ERROR = 0x02;
}
constexpr
itself tells that its a const expression. Why do we need const
after static
? What does this line mean to the compiler?
I searched in Google to understand this line.
const
-> read-only.“I searched in Google to understand this line.” and did not get any results? Hard to believe. If you did get results, then which? And why did they not help you? I for example searched for “constexpr static const” and found, among many more hits, a promising video explanation first hit. Without explaining what is missing in the most prominent hits, you risk getting only answer which tell you the same unhelpful things.