Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-11-14 03:07:26


Daniel James wrote:
> David Abrahams wrote:
>
>> Are you sure that you don't have G++ set to treat warnings as errors?
>> This has shown up as a warning in other cases, but we decided not to
>> apply a workaround to eval_if because that would just propagate the
>> need for a workaround further out.
>
>
> I don't think so. I've tried again using:
>
> g++ -Wno-error -I ../../.. -I /home/daniel/projects/boost
> named_params_test.cpp
>
> and it still fails.

I checked in a fix for this to the sandbox CVS.

Index: named_params.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/named_params.hpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- named_params.hpp 5 Nov 2004 14:18:21 -0000 1.28
+++ named_params.hpp 14 Nov 2004 08:02:43 -0000 1.29
@@ -418,6 +418,12 @@
       typedef mpl::bool_<value> type;
    };

+ template <class T>
+ struct get_type
+ {
+ typedef typename T::type type;
+ };
+
    // Produces the unwrapped type to hold a reference to in named<>
    // Can't use boost::unwrap_reference<> here because it
    // doesn't handle the case where T = const reference_wrapper<U>
@@ -426,7 +432,7 @@
    {
        typedef typename mpl::eval_if<
            is_const_reference_wrapper<T>
- , T
+ , get_type<T>
          , mpl::identity<T>
>::type type;
    };

Thanks,

-- 
Daniel Wallin

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