vendredi 23 septembre 2016

Check if two types are equal in C++

How to check if types are equal in C++11?

 std::uint32_t == unsigned;  //#1

And another snippet

template<typename T> struct A{ 
  string s = T==unsigned ? "unsigned" : "other";
}

Aucun commentaire:

Enregistrer un commentaire