Please tell me why this this answer works.
- What happen to the enable_if such we can omit it after that?
- Should not that code be something like this:
Edited version:
template <typename Policy,
typename = typename std::enable_if<std::is_base_of<BasePolicy, Policy>::value>::type >
struct Foo;
template <typename Policy>
struct Foo<Policy> { // <Policy> added!
Foo();
};
template <typename Policy>
Foo<Policy>::Foo() {
}
Aucun commentaire:
Enregistrer un commentaire