Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2004-10-13 14:15:11


On 10/13/2004 01:56 PM, Aleksey Gurtovoy wrote:
[snip]
>
> Larry, this is not related to "apply_if" renaming, but rather to changes
> in the MPL's iterator protocol --
> http://www.mywikinet.com/mpl/mpl_1_32_changelog/iterator-protocol.html.
>
> In particular, every place where you're dereferencing MPL iterators via
> '::type' needs to be re-written using 'mpl::deref' metafunction, as per
> cited document.
>
> HTH,
> --

Thanks Aleksey. However, following the first row in that table:

Before Now
------ ---
i::type deref<i>::type

I changed the toy example to:

<------------------
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/deref.hpp>
struct C
{
     static bool const value=true;
};
struct f1
{};
struct f2
{};
namespace boost{namespace mpl{

typedef deref<eval_if<C,f1,f2> >::type X;
X x;

}}
>------------------
and got this error:
<------------------
/home/evansl/prog_dev/boost-snapshot/boost-04-10-04-0600/boost/mpl/deref.hpp(30):
error: class "boost::mpl::eval_if<C, f1, f2>" has no member "type"
       typedef typename Iterator::type type;
                                  ^
           detected during instantiation of class
"boost::mpl::deref<Iterator> [with Iterator=boost::mpl::eval_if<C, f1,
f2>]" at line 13 of "test.cpp"
>------------------
Please let me know what else I should do.

TIA.

Regards,
Larry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk