Boost logo

Boost :

Subject: Re: [boost] Boost.Convert+Boost.Parameter
From: Vladimir.Batov_at_[hidden]
Date: 2009-02-22 17:30:45

Trying to use Boost.Parameter as Daniel showed. Wow, that's truly hairy
stuff. Obviously I get it wrong somewhere as matching Parameters
constructor cannot be found. I am trying to call

        int ii = convert_to<int>("1", boost::convert_parameters::default_
= -1);

when I have declarations below as (I think) Daniel indicated.

    namespace convert_parameters
        BOOST_PARAMETER_NAME((from_, tag) from_)
        BOOST_PARAMETER_NAME((default_, tag) default_)

    template<class TypeOut, class ArgumentPack>
    test(ArgumentPack const& args)
        return TypeOut();

        class TypeOut,
        class TypeIn,
        class A0>
    convert<TypeIn, TypeOut>
    convert_to(TypeIn const& value_in, A0 const& a0)
> Parameters;

        return test<TypeOut>(Parameters(value_in, a0));

Any help? Please?


Boost list run by bdawes at, gregod at, cpdaniel at, john at