Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-09-15 16:17:56


Marco Costalba wrote:
<snip errors>
>
> The test now is:
>
> struct make_string
> {
> template<typename T, typename State>
> struct result
> {
> typedef std::string result_type;
> };
>
> template<typename T>
> std::string operator()(const T& t, const std::string& str) const
> {
> return str + boost::lexical_cast<std::string>(t);
> }
> };
>

That's not what I meant. Don't just substitute the nested typedef but
the whole metafunction:

    struct make_string
    {
        typedef std::string result_type;

...

Regards,
Tobias


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