mercredi 29 juillet 2015

Why are non-integral non-type template parameters illegal?

One can have constant expressions of non-integral literal types:

constexpr double a = 4.5;

What is the reason for not allowing non-type template parameters of such types? In other words, why shouldn't I be able to write:

template <double param>
struct C {...};

Aucun commentaire:

Enregistrer un commentaire