The following compile with no problem in g++ :
template<typename ReturnType = double, typename OtherType> ReturnType func(const OtherType& var)
{
ReturnType result = 0;
/* SOMETHING */
return result;
}
Is it ok for all standard-compliant compilers to have a not-defaulted template parameter (OtherType here) after a defaulted template parameter (ReturnType here) ?