Boost logo

Boost :

From: Marcus Lindblom (macke_at_[hidden])
Date: 2007-09-04 03:50:03


Marcus Lindblom wrote:

> std::ostream & EnumIOBase::out(std::ostream & os, int value) const

Sorry, the body for this function should of course be as follows.
(I edited some of the code to remove some cruft from our current version)

std::ostream & EnumIOBase::out(std::ostream & os, int value) const
{
     MapOut::const_iterator i = m_i->m_mapOut.find(value);

     if (i != m_i->m_mapOut.end()) {
         os << i->second;
     } else {
         os.setstate(std::ios::failbit);
     }

     return os;
}

Cheers,
/Marcus


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