Boost logo

Boost Users :

Subject: Re: [Boost-users] Using SFINAE to detect presence of member function - Unreliable
From: Naik, Roshan (roshan.naik_at_[hidden])
Date: 2009-02-02 15:44:16


Roman Perepelitsa wrote:
>
> Sorry, I don't know how to make it work for functions without arguments. Problem is that this program is
> invalid:
> void foo() {}
> void foo(...) {}
>
> int main() {
>  foo();  // Ambiguous.
> }

Since the stuff now works with void arguments (as I noted).. only one final issue remains...
This does not work with types that cannot be used as base classes (e.g. primitive types, enums) etc.
The compiler errors out.

-Roshan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net