mercredi 21 décembre 2016

How to remove the default "error: static assertion failed:" and print only my message in static_assert?

Whenever assertion fails in a code like:

static_assert(std::get<0>(tup1) == 0, "Expected value of 0 is not there");

I would like my program to print only the diagnostic Expected value of 0 is not there instead of error: static assertion failed: Expected value of 0 is not there. How to accomplish this?

Aucun commentaire:

Enregistrer un commentaire