Boost logo

Boost Users :

Subject: Re: [Boost-users] [enable_if] Compile Time Member Overloading
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2012-11-19 15:29:24


Hi Christian

> One more thing do I actually need to build a mpl::bool_ out of the
> is_same function?
>
>
No, in fact you can drop the bool, and and true; and just use enable_if.
enable_if will even use the boolean operator to get to the underlying
boolean ::value so you drop even more syntax:

    template< typename T1
            , typename T2
>
    void read_data_24( typename enable_if< is_same< T1, T2 > > ::type*
/* ptr */ = 0)
    {
        int i = 9;

           }

HTH
Steve



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