I am trying to write a class, which should either define a member function with one or no parameters depending on whether its template type is void or not, as in:
template<typename R = void>
class Query
{
public:
// define if R is void
void Answer()
{
...
}
// define if R is NOT void
void Answer(R&& result)
{
...
}
};