G
Guest
Hi everyone, I've got this pice of code:
template <bool cond, typename A, typename B>
struct Select{
typedef A Result;
};
template <typename A, typename B>
struct Select<false, A, B>{
typedef B Result;
};
Select<false, char, float>::Result temp;
What is the second template supposed to be? An implicit specialization? It's
not an explicit one for sure.
If anyone could explain me what happens ...it would be great. thanx
template <bool cond, typename A, typename B>
struct Select{
typedef A Result;
};
template <typename A, typename B>
struct Select<false, A, B>{
typedef B Result;
};
Select<false, char, float>::Result temp;
What is the second template supposed to be? An implicit specialization? It's
not an explicit one for sure.
If anyone could explain me what happens ...it would be great. thanx