From a002b9749dc1d9dab54b90ffff4a65c00fa7242a Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
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 <mstahl@redhat.com>
---
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
|
b
|
namespace date_time {
|
| 113 | 113 | spec_str = "mdy"; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | | typedef typename date_type::year_type year_type; |
| 117 | 116 | typedef typename date_type::month_type month_type; |
| 118 | 117 | unsigned pos = 0; |
| 119 | 118 | unsigned short year(0), month(0), day(0); |
| … |
… |
namespace date_time {
|
| 160 | 159 | parse_undelimited_date(const std::string& s) { |
| 161 | 160 | int offsets[] = {4,2,2}; |
| 162 | 161 | int pos = 0; |
| 163 | | typedef typename date_type::year_type year_type; |
| | 162 | //typedef typename date_type::year_type year_type; |
| 164 | 163 | //typename date_type::ymd_type ymd((year_type::min)(),1,1); |
| 165 | 164 | unsigned short y = 0, m = 0, d = 0; |
| 166 | 165 | |
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
|
b
|
namespace gregorian {
|
| 215 | 215 | { |
| 216 | 216 | std::istream_iterator<std::basic_string<charT>, charT> beg(is), eos; |
| 217 | 217 | |
| 218 | | typedef boost::date_time::all_date_names_put<greg_facet_config, charT> facet_def; |
| 219 | 218 | d = from_stream(beg, eos); |
| 220 | 219 | return is; |
| 221 | 220 | } |
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
|
b
|
namespace local_time {
|
| 36 | 36 | boost::io::ios_flags_saver iflags(os); |
| 37 | 37 | typedef local_date_time time_type;//::utc_time_type typename |
| 38 | 38 | typedef date_time::time_facet<time_type, CharT> custom_time_facet; |
| 39 | | typedef std::time_put<CharT> std_time_facet; |
| 40 | 39 | std::ostreambuf_iterator<CharT> oitr(os); |
| 41 | 40 | |
| 42 | 41 | if(std::has_facet<custom_time_facet>(os.getloc())) { |
| … |
… |
namespace local_time {
|
| 123 | 122 | const boost::local_time::local_time_period& p) { |
| 124 | 123 | boost::io::ios_flags_saver iflags(os); |
| 125 | 124 | typedef boost::date_time::time_facet<local_date_time, CharT> custom_facet; |
| 126 | | typedef std::time_put<CharT> std_time_facet; |
| 127 | 125 | std::ostreambuf_iterator<CharT> oitr(os); |
| 128 | 126 | if (std::has_facet<custom_facet>(os.getloc())) { |
| 129 | 127 | std::use_facet<custom_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
|
b
|
namespace posix_time {
|
| 47 | 47 | const ptime& p) { |
| 48 | 48 | boost::io::ios_flags_saver iflags(os); |
| 49 | 49 | typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; |
| 50 | | typedef std::time_put<CharT> std_ptime_facet; |
| 51 | 50 | std::ostreambuf_iterator<CharT> oitr(os); |
| 52 | 51 | if (std::has_facet<custom_ptime_facet>(os.getloc())) |
| 53 | 52 | std::use_facet<custom_ptime_facet>(os.getloc()).put(oitr, os, os.fill(), p); |
| … |
… |
namespace posix_time {
|
| 114 | 113 | const boost::posix_time::time_period& p) { |
| 115 | 114 | boost::io::ios_flags_saver iflags(os); |
| 116 | 115 | typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; |
| 117 | | typedef std::time_put<CharT> std_time_facet; |
| 118 | 116 | std::ostreambuf_iterator<CharT> oitr(os); |
| 119 | 117 | if (std::has_facet<custom_ptime_facet>(os.getloc())) { |
| 120 | 118 | std::use_facet<custom_ptime_facet>(os.getloc()).put(oitr, os, os.fill(), p); |
| … |
… |
namespace posix_time {
|
| 180 | 178 | { |
| 181 | 179 | boost::io::ios_flags_saver iflags(os); |
| 182 | 180 | typedef boost::date_time::time_facet<ptime, CharT> custom_ptime_facet; |
| 183 | | typedef std::time_put<CharT> std_ptime_facet; |
| 184 | 181 | std::ostreambuf_iterator<CharT> oitr(os); |
| 185 | 182 | if (std::has_facet<custom_ptime_facet>(os.getloc())) |
| 186 | 183 | std::use_facet<custom_ptime_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
|
b
|
namespace date_time {
|
| 21 | 21 | inline |
| 22 | 22 | std::basic_string<OutputT> convert_string_type(const std::basic_string<InputT>& inp_str) |
| 23 | 23 | { |
| 24 | | typedef std::basic_string<InputT> input_type; |
| 25 | 24 | typedef std::basic_string<OutputT> output_type; |
| 26 | 25 | output_type result; |
| 27 | 26 | 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
|
b
|
gather_month_strings(const std::locale& locale, bool short_strings=true)
|
| 35 | 35 | { |
| 36 | 36 | typedef std::basic_string<charT> string_type; |
| 37 | 37 | typedef std::vector<string_type> collection_type; |
| 38 | | typedef std::basic_ostringstream<charT> ostream_type; |
| 39 | 38 | typedef std::ostreambuf_iterator<charT> ostream_iter_type; |
| 40 | 39 | typedef std::basic_ostringstream<charT> stringstream_type; |
| 41 | 40 | typedef std::time_put<charT> time_put_facet_type; |
| … |
… |
gather_weekday_strings(const std::locale& locale, bool short_strings=true)
|
| 86 | 85 | { |
| 87 | 86 | typedef std::basic_string<charT> string_type; |
| 88 | 87 | typedef std::vector<string_type> collection_type; |
| 89 | | typedef std::basic_ostringstream<charT> ostream_type; |
| 90 | 88 | typedef std::ostreambuf_iterator<charT> ostream_iter_type; |
| 91 | 89 | typedef std::basic_ostringstream<charT> stringstream_type; |
| 92 | 90 | typedef std::time_put<charT> time_put_facet_type; |