On 6 May, 20:47, mcostalba <mcosta...@[EMAIL PROTECTED]
> wrote:
> Anyhow here is my much simpler solution...so simple that is probably
> broken in some way, but I cannot find where:
> [cut]
> BTW it seems to work.
Seems like it does not work for functions (always returns false for
them)
and it's not that smart with regard to const objects and const
methods.
Here is how original is_call_possible works:
struct foo {
void operator()();
};
struct bar {
void operator()() const;
};
assert(is_call_possible<foo, void()>::value);
assert(!is_call_possible<const foo, void()>::value);
assert(is_call_possible<bar, void()>::value);
assert(is_call_possible<const bar, void()>::value);
But maybe you don't need this functionality...
Roman Perepelitsa.
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|