From a002b9749dc1d9dab54b90ffff4a65c00fa7242a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 13 Apr 2014 23:52:15 +0200 Subject: [PATCH 2/2] date_time: fix GCC 4.8 -Wunused-local-typedefs warnings Signed-off-by: Michael Stahl --- include/boost/date_time/date_parsing.hpp | 3 +-- include/boost/date_time/gregorian/greg_facet.hpp | 1 - include/boost/date_time/local_time/local_time_io.hpp | 2 -- include/boost/date_time/posix_time/posix_time_io.hpp | 3 --- include/boost/date_time/string_convert.hpp | 1 - include/boost/date_time/strings_from_facet.hpp | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/boost/date_time/date_parsing.hpp b/include/boost/date_time/date_parsing.hpp index fc0599d..0e1f746 100644 --- a/include/boost/date_time/date_parsing.hpp +++ b/include/boost/date_time/date_parsing.hpp @@ -113,7 +113,6 @@ namespace date_time { spec_str = "mdy"; } - typedef typename date_type::year_type year_type; typedef typename date_type::month_type month_type; unsigned pos = 0; unsigned short year(0), month(0), day(0); @@ -160,7 +159,7 @@ namespace date_time { parse_undelimited_date(const std::string& s) { int offsets[] = {4,2,2}; int pos = 0; - typedef typename date_type::year_type year_type; + //typedef typename date_type::year_type year_type; //typename date_type::ymd_type ymd((year_type::min)(),1,1); unsigned short y = 0, m = 0, d = 0; diff --git a/include/boost/date_time/gregorian/greg_facet.hpp b/include/boost/date_time/gregorian/greg_facet.hpp index f58d49a..263ec2a 100644 --- a/include/boost/date_time/gregorian/greg_facet.hpp +++ b/include/boost/date_time/gregorian/greg_facet.hpp @@ -215,7 +215,6 @@ namespace gregorian { { std::istream_iterator, charT> beg(is), eos; - typedef boost::date_time::all_date_names_put facet_def; d = from_stream(beg, eos); return is; } diff --git a/include/boost/date_time/local_time/local_time_io.hpp b/include/boost/date_time/local_time/local_time_io.hpp index 3c3d2b1..c32b81e 100644 --- a/include/boost/date_time/local_time/local_time_io.hpp +++ b/include/boost/date_time/local_time/local_time_io.hpp @@ -36,7 +36,6 @@ namespace local_time { boost::io::ios_flags_saver iflags(os); typedef local_date_time time_type;//::utc_time_type typename typedef date_time::time_facet custom_time_facet; - typedef std::time_put std_time_facet; std::ostreambuf_iterator oitr(os); if(std::has_facet(os.getloc())) { @@ -123,7 +122,6 @@ namespace local_time { const boost::local_time::local_time_period& p) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_facet; - typedef std::time_put std_time_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) { std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); diff --git a/include/boost/date_time/posix_time/posix_time_io.hpp b/include/boost/date_time/posix_time/posix_time_io.hpp index 9506b32..45c338b 100644 --- a/include/boost/date_time/posix_time/posix_time_io.hpp +++ b/include/boost/date_time/posix_time/posix_time_io.hpp @@ -47,7 +47,6 @@ namespace posix_time { const ptime& p) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; - typedef std::time_put std_ptime_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); @@ -114,7 +113,6 @@ namespace posix_time { const boost::posix_time::time_period& p) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; - typedef std::time_put std_time_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) { std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); @@ -180,7 +178,6 @@ namespace posix_time { { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; - typedef std::time_put std_ptime_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(oitr, os, os.fill(), td); diff --git a/include/boost/date_time/string_convert.hpp b/include/boost/date_time/string_convert.hpp index 3ff9095..30be356 100644 --- a/include/boost/date_time/string_convert.hpp +++ b/include/boost/date_time/string_convert.hpp @@ -21,7 +21,6 @@ namespace date_time { inline std::basic_string convert_string_type(const std::basic_string& inp_str) { - typedef std::basic_string input_type; typedef std::basic_string output_type; output_type result; result.insert(result.begin(), inp_str.begin(), inp_str.end()); diff --git a/include/boost/date_time/strings_from_facet.hpp b/include/boost/date_time/strings_from_facet.hpp index e44144f..800919a 100644 --- a/include/boost/date_time/strings_from_facet.hpp +++ b/include/boost/date_time/strings_from_facet.hpp @@ -35,7 +35,6 @@ gather_month_strings(const std::locale& locale, bool short_strings=true) { typedef std::basic_string string_type; typedef std::vector collection_type; - typedef std::basic_ostringstream ostream_type; typedef std::ostreambuf_iterator ostream_iter_type; typedef std::basic_ostringstream stringstream_type; typedef std::time_put time_put_facet_type; @@ -86,7 +85,6 @@ gather_weekday_strings(const std::locale& locale, bool short_strings=true) { typedef std::basic_string string_type; typedef std::vector collection_type; - typedef std::basic_ostringstream ostream_type; typedef std::ostreambuf_iterator ostream_iter_type; typedef std::basic_ostringstream stringstream_type; typedef std::time_put time_put_facet_type; -- 1.8.3.1