$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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>
    TypeOut
    test(ArgumentPack const& args)
    {
        return TypeOut();
    }
    template<
        class TypeOut,
        class TypeIn,
        class A0>
    convert<TypeIn, TypeOut>
    convert_to(TypeIn const& value_in, A0 const& a0)
    {
        typedef 
parameter::parameters<parameter::required<convert_parameters::tag::from_> 
> Parameters;
        return test<TypeOut>(Parameters(value_in, a0));
    }
Any help? Please?
Thanks,
Vladimir.