Closed
Description
Affected rules
- M0-1-3
Description
Constexpr variables which are used in template instantiations are not considered "used".
Example
template <int t>
class CharBuffer
{
public:
int member[t];
CharBuffer():member{0}{}
};
int foo()
{
constexpr int line_length = 1024U;
CharBuffer<line_length> buffer{}; // line_length is used here but reported as a violation for M0-1-3
return buffer.member[0];
}