I have written a template class that should expose its template parameter, but I am unsure of the appropriate naming.
I have found three different names for essentially the same thing (as far as I can tell):
- containers, e.g.,
std::vector
usevalue_type
- smart pointers, e.g.,
std::unique_ptr
useelement_type
std::reference_wrapper
uses justtype
What is the idea behind these different names? What standard algorithms or trait classes depend on which name? Which name should I use for my class (something in between a smart pointer and reference wrapper)?
Aucun commentaire:
Enregistrer un commentaire