templates - C++ order of type modifiers -
templates - C++ order of type modifiers -
in c++ have template functions. example:
template<class a,class b> void something(a a, b b){ //do }
how compiler guess modifiers of types , b? a, a&, const a& etc... criteria uses pick type modifiers? specified standard?
yes standard has rather complex rules on type deduction. far long quote here, knowing behaviour specified exactly c++ plenty satisfy you. note rules pretty much same auto
.
c++ templates
Comments
Post a Comment