Boost logo

Boost :

From: Judd Tracy (jtracy_at_[hidden])
Date: 2004-08-25 13:39:50


I am trying to use boost:add_reference in a template function to protect
against the reference of reference problems, but it is breaking type
deduction and I was wondering if any one know of a solution to this.

template<typename Type>
read(std::istream& stream, Type& data);

This works properly of course.

-----------------------------------------

template<typename Type>
read (std::istream& stream, typename boost::add_reference<Type>::type data);

This one does not work properly and I have to explicitly specify the type.

Judd Tracy
Assistant in Simulation
Institute for Simulation and Training
University of Central Florida


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