Is there a way to make static_assert\'s string being dynamically customized and then displayed?
What I mean is something like:
//pseudo code
static_ass
As Matthieu said, it's not possible, but you can get some of the functionalities you're looking for by using macros:
#define CHECK_TYPE_RANGE(type)\
static_assert(Check_Range::value, "Value of " #type " type is not so good ;)");
CHECK_TYPE_RANGE(float); // outputs "Value of float type is not so good ;)"