vendredi 26 février 2021

Why is std::declval not constexpr?

As in question - why is code like this illegal in cpp?

static_assert(std::declval<std::array<int, 4>>().size() == 4);

Is it an overlook in standard or there is some deeper rationale why std::declval is not constexpr?

Aucun commentaire:

Enregistrer un commentaire