jeudi 27 octobre 2016

C++ Get min / max value of a static array at compile time

Let's say I have an array of integers defined like that:

static const int IntArray[] = {1, 5, 10, 12, 17};

Is there a way to the minimum or maximum value at compile time?

Aucun commentaire:

Enregistrer un commentaire