diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-08-02 20:41:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-08-02 21:03:09 (GMT) |
commit | d5ace22054203c7989691ae8b3fa4e4784d1b57e (patch) | |
tree | 64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/date_time/tz_db_base.hpp | |
parent | 6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff) | |
download | swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.zip swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.tar.bz2 |
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/date_time/tz_db_base.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/date_time/tz_db_base.hpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp b/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp index 2440115..a24fa8b 100644 --- a/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp +++ b/3rdParty/Boost/src/boost/date_time/tz_db_base.hpp @@ -5,7 +5,7 @@ * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst - * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $ + * $Date: 2011-07-07 00:57:37 -0400 (Thu, 07 Jul 2011) $ */ #include <map> @@ -167,6 +167,16 @@ namespace boost { tz_db_base() {} //! Process csv data file, may throw exceptions + /*! May throw bad_field_count exceptions */ + void load_from_stream(std::istream &in) + { + std::string buff; + while( std::getline(in, buff)) { + parse_string(buff); + } + } + + //! Process csv data file, may throw exceptions /*! May throw data_not_accessible, or bad_field_count exceptions */ void load_from_file(const std::string& pathspec) { @@ -178,10 +188,7 @@ namespace boost { boost::throw_exception(data_not_accessible(pathspec)); } std::getline(ifs, buff); // first line is column headings - - while( std::getline(ifs, buff)) { - parse_string(buff); - } + this->load_from_stream(ifs); } //! returns true if record successfully added to map |