Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51253 - trunk/libs/random
From: steven_at_[hidden]
Date: 2009-02-14 11:21:05


Author: steven_watanabe
Date: 2009-02-14 11:21:04 EST (Sat, 14 Feb 2009)
New Revision: 51253
URL: http://svn.boost.org/trac/boost/changeset/51253

Log:
Don't assume that std::vector<int>::const_iterator has a nested difference_type. Use iterator_traits.
Text files modified:
   trunk/libs/random/instantiate.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/libs/random/instantiate.cpp
==============================================================================
--- trunk/libs/random/instantiate.cpp (original)
+++ trunk/libs/random/instantiate.cpp 2009-02-14 11:21:04 EST (Sat, 14 Feb 2009)
@@ -153,7 +153,7 @@
   std::vector<int>::const_iterator it_end = v.end();
   URNG urng3(it, it_end);
   BOOST_CHECK(it != v.begin());
- std::vector<int>::const_iterator::difference_type n_words = (it - v.begin());
+ std::iterator_traits<std::vector<int>::const_iterator>::difference_type n_words = (it - v.begin());
   std::cout << "; seeding uses " << n_words << " words" << std::endl;
 
   it = v.end();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk