Boost logo

Boost Users :

Subject: Re: [Boost-users] compile-time check that a member function exists
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2009-03-25 13:39:33


Igor R a écrit :
>> Check Boost.vault for a file called introspection.zip, it contains the
>> afformentionned macros in a boost-ified form.
>>
>
>
> Great, thank you!
> Unfortunately, there's one more issue: it seems that this test fails
> if the function is inherited from a base class. I mean the following
> situation:
>
> struct B
> {
> void f(int);
> };
>
> struct D : B
> { };
>
> BOOST_HAS_MEMBER_FUNCTION(f, void(int))
> //has_member_function_f<D>::type is mpl::bool_<false>
>
> Is it possible to overcome this problem?
>
It is a known "bug" (or more precisley a known missing feature).
I'm working on a solution but it involves declaring the whole list of a
class parent :/

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

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