mercredi 9 octobre 2019

How to cast template arguments

I'm trying to cast the argument of Type2 to Type. It's not compiling.

Specifically, I'm trying to compare items of two different types, and want to cast the second element y to (Type).

This is in C++

template
Type larger(Type x, Type2 static_cast(y));

E: Clarity

Aucun commentaire:

Enregistrer un commentaire