jeudi 25 décembre 2014


This question already has an answer here:




Why does this static assertion fire?



static_assert(std::is_const<const int&>::value, "Pain");


Would be awesome to get both a syntactic (why the implementation would do this) and a semantic reasoning (why they would have designed this type trait's interface to do this).


I am aware it is possible to throw in a std::remove_reference call to get the expected outcome, but I'm not sure why that's necessary.


Aucun commentaire:

Enregistrer un commentaire