
22 Feb
2004
22 Feb
'04
2:34 p.m.
Consider: // A strange way to retrieve my_container.begin(): boost::prior( my_container.end(), my_container.size() ); Is that legal? The second template parameter of boost::prior is deduced to an unsigned(!) type, which IMHO means that -n is undefined, right? Do we need to fix this? Maybe: template <class T> T prior(T x, typename T::difference_type n) { std::advance(x, -n); return x; } or shall we document that it's illegal/undefined to call boost::prior() with an unsigned second parameter? Regards, Daniel -- Daniel Frey aixigo AG - financial solutions & technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey@aixigo.de, web: http://www.aixigo.de