Template method enable_if specialization

Viewed 2077

i have following code that does not compile. This are two functions in a template class that takes the arguments

typename std::enable_if<std::is_void<Ret>::value, Ret>::type _on_dispatched() {
    // ...
}

typename std::enable_if<!std::is_void<Ret>::value, Ret>::type _on_dispatched() {
    // ....
}

I want to have a specialization in a member method depending on what type Ret is.

Has anybody some idea?

2 Answers
Related