17 Mar
2009
17 Mar
'09
12:32 a.m.
on Fri Mar 13 2009, Roman Perepelitsa
I need a metafunction that returns true iif a type has a constructor with 2 arguments of a given type. Does mpl have it? If not, is it possible to implement?
template
struct is_constructible_from; struct foo { foo(int, int); }; struct bar { bar(int*, int); }; struct baz {};
int main() { assert(is_constructible_from
::value); assert(is_constructible_from ::value); assert(!is_constructible_from ::value); assert(!is_constructible_from ::value); };
I know of no way to do that. -- Dave Abrahams BoostPro Computing http://www.boostpro.com