mardi 30 janvier 2018

checking uniqueness of characters at compile time

Is it possible in C++11 (not later) to write a function that verifies the uniqueness of characters passed to it at compile time

verify('a');
verify('b');
verify('c');
verify('a');  //should cause compilation error

Aucun commentaire:

Enregistrer un commentaire