Boost logo

Boost :

Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-08-07 18:28:41


AMDG

On 08/07/2012 10:45 AM, Paul A. Bristow wrote:
>
> This specialization of ostreamable:
>
> template<>
> struct ostreamable<class Os, const std::pair<const int, double>& >
> {
> static void apply(Os& out, const std::pair<const int, double>& arg)
> {
> out << arg; // No operator<< of type 'Os'
> }
> };
>
> still doesn't resolve the requirement.
>

This is an explicit specialization which uses a
class called Os. I think you intended a partial
specialization:

template<class Os>
struct ostreamable<Os, std::pair<const int, double> >;

> type_erasure_print_map.cpp(140): error C2678: binary '<<' : no operator found which takes a
> left-hand operand of type 'Os' (or there is no acceptable conversion)
>

In Christ,
Steven Watanabe


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