In this code:
===
template <int Nclass Base { };
template <int Nclass Other {
public:
explicit Other (Base<N&) { }
};
int main () {
Base<3ok;
Other<3fine(ok);
}
===
Maybe this is a dumb question, but why do I have to specify the
template parameter to "Other<3fine(ok)"? Can't it deduce that it
should be a 3 on it's own (since a Base<3is being passed to the
constructor, and Base<3has no casting operators that could confuse
it, there's no other type it could be)? I want to just say "Other
fine(ok);".
Jason