|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85905 - in trunk/boost/date_time: . gregorian posix_time
From: steveire_at_[hidden]
Date: 2013-09-25 09:52:11
Author: skelly
Date: 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013)
New Revision: 85905
URL: http://svn.boost.org/trac/boost/changeset/85905
Log:
DateTime: Remove obsolete MSVC version checks.
Text files modified:
trunk/boost/date_time/compiler_config.hpp | 4 +---
trunk/boost/date_time/date_parsing.hpp | 5 -----
trunk/boost/date_time/gregorian/parsers.hpp | 4 ----
trunk/boost/date_time/posix_time/time_formatters.hpp | 32 ++------------------------------
trunk/boost/date_time/posix_time/time_formatters_limited.hpp | 32 ++------------------------------
trunk/boost/date_time/time_facet.hpp | 6 ------
trunk/boost/date_time/time_parsing.hpp | 35 -----------------------------------
trunk/boost/date_time/time_resolution_traits.hpp | 9 ---------
8 files changed, 5 insertions(+), 122 deletions(-)
Modified: trunk/boost/date_time/compiler_config.hpp
==============================================================================
--- trunk/boost/date_time/compiler_config.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/compiler_config.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -19,7 +19,6 @@
// (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) &&
#if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \
|| BOOST_WORKAROUND( __GNUC__, < 3) \
- || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \
) \
&& !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
# define USE_DATE_TIME_PRE_1_33_FACET_IO
@@ -80,8 +79,7 @@
// Compilers affected are:
// gcc295, msvc (neither with STLPort), any borland
//
-#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
- (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
+#if ((defined(__GNUC__) && (__GNUC__ < 3)) && \
!defined(_STLP_OWN_IOSTREAMS) ) || \
BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
Modified: trunk/boost/date_time/date_parsing.hpp
==============================================================================
--- trunk/boost/date_time/date_parsing.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/date_parsing.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -280,9 +280,6 @@
return parse_date<date_type>(ss.str());
}
#endif // BOOST_NO_STD_WSTRING
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings
-#else
//! function called by wrapper functions: date_period_from_(w)string()
template<class date_type, class charT>
period<date_type, typename date_type::duration_type>
@@ -307,8 +304,6 @@
date_type d2 = from_stream_type<date_type>(date_string_start, date_string_end, value_type());
return period<date_type, typename date_type::duration_type>(d1, d2);
}
-#endif
-
} } //namespace date_time
Modified: trunk/boost/date_time/gregorian/parsers.hpp
==============================================================================
--- trunk/boost/date_time/gregorian/parsers.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/gregorian/parsers.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -71,9 +71,6 @@
}
#endif //BOOST_NO_STD_ITERATOR_TRAITS
-#if (defined(_MSC_VER) && (_MSC_VER < 1300))
- // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings
-#else
//! Function to parse a date_period from a string (eg: [2003-Oct-31/2003-Dec-25])
inline date_period date_period_from_string(const std::string& s){
return date_time::from_simple_string_type<date,char>(s);
@@ -84,7 +81,6 @@
return date_time::from_simple_string_type<date,wchar_t>(s);
}
# endif // BOOST_NO_STD_WSTRING
-#endif
} } //namespace gregorian
Modified: trunk/boost/date_time/posix_time/time_formatters.hpp
==============================================================================
--- trunk/boost/date_time/posix_time/time_formatters.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/posix_time/time_formatters.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -64,26 +64,12 @@
ss << std::setw(2) << std::setfill(fill_char)
<< date_time::absolute_value(td.seconds());
//TODO the following is totally non-generic, yelling FIXME
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- boost::int64_t frac_sec =
- date_time::absolute_value(td.fractional_seconds());
- // JDG [7/6/02 VC++ compatibility]
- charT buff[32];
- _i64toa(frac_sec, buff, 10);
-#else
time_duration::fractional_seconds_type frac_sec =
date_time::absolute_value(td.fractional_seconds());
-#endif
if (frac_sec != 0) {
ss << "." << std::setw(time_duration::num_fractional_digits())
<< std::setfill(fill_char)
-
- // JDG [7/6/02 VC++ compatibility]
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- << buff;
-#else
- << frac_sec;
-#endif
+ << frac_sec;
}
}// else
return ss.str();
@@ -133,26 +119,12 @@
ss << std::setw(2) << std::setfill(fill_char)
<< date_time::absolute_value(td.seconds());
//TODO the following is totally non-generic, yelling FIXME
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- boost::int64_t frac_sec =
- date_time::absolute_value(td.fractional_seconds());
- // JDG [7/6/02 VC++ compatibility]
- charT buff[32];
- _i64toa(frac_sec, buff, 10);
-#else
time_duration::fractional_seconds_type frac_sec =
date_time::absolute_value(td.fractional_seconds());
-#endif
if (frac_sec != 0) {
ss << "." << std::setw(time_duration::num_fractional_digits())
<< std::setfill(fill_char)
-
- // JDG [7/6/02 VC++ compatibility]
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- << buff;
-#else
- << frac_sec;
-#endif
+ << frac_sec;
}
}// else
return ss.str();
Modified: trunk/boost/date_time/posix_time/time_formatters_limited.hpp
==============================================================================
--- trunk/boost/date_time/posix_time/time_formatters_limited.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/posix_time/time_formatters_limited.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -57,26 +57,12 @@
ss << std::setw(2) << std::setfill('0')
<< date_time::absolute_value(td.seconds());
//TODO the following is totally non-generic, yelling FIXME
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- boost::int64_t frac_sec =
- date_time::absolute_value(td.fractional_seconds());
- // JDG [7/6/02 VC++ compatibility]
- char buff[32];
- _i64toa(frac_sec, buff, 10);
-#else
time_duration::fractional_seconds_type frac_sec =
date_time::absolute_value(td.fractional_seconds());
-#endif
if (frac_sec != 0) {
ss << "." << std::setw(time_duration::num_fractional_digits())
<< std::setfill('0')
-
- // JDG [7/6/02 VC++ compatibility]
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- << buff;
-#else
- << frac_sec;
-#endif
+ << frac_sec;
}
}// else
return ss.str();
@@ -120,26 +106,12 @@
ss << std::setw(2) << std::setfill('0')
<< date_time::absolute_value(td.seconds());
//TODO the following is totally non-generic, yelling FIXME
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- boost::int64_t frac_sec =
- date_time::absolute_value(td.fractional_seconds());
- // JDG [7/6/02 VC++ compatibility]
- char buff[32];
- _i64toa(frac_sec, buff, 10);
-#else
time_duration::fractional_seconds_type frac_sec =
date_time::absolute_value(td.fractional_seconds());
-#endif
if (frac_sec != 0) {
ss << "." << std::setw(time_duration::num_fractional_digits())
<< std::setfill('0')
-
- // JDG [7/6/02 VC++ compatibility]
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- << buff;
-#else
- << frac_sec;
-#endif
+ << frac_sec;
}
}// else
return ss.str();
Modified: trunk/boost/date_time/time_facet.hpp
==============================================================================
--- trunk/boost/date_time/time_facet.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/time_facet.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -580,13 +580,7 @@
ss.imbue(std::locale::classic()); // don't want any formatting
ss << std::setw(width)
<< std::setfill(static_cast<char_type>('0'));
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- // JDG [7/6/02 VC++ compatibility]
- char_type buff[34];
- ss << _i64toa(static_cast<boost::int64_t>(val), buff, 10);
-#else
ss << val;
-#endif
return ss.str();
}
Modified: trunk/boost/date_time/time_parsing.hpp
==============================================================================
--- trunk/boost/date_time/time_parsing.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/time_parsing.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -81,23 +81,6 @@
};
case 3: {
int digits = static_cast<int>(beg->length());
- //Works around a bug in MSVC 6 library that does not support
- //operator>> thus meaning lexical_cast will fail to compile.
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- // msvc wouldn't compile 'time_duration::num_fractional_digits()'
- // (required template argument list) as a workaround a temp
- // time_duration object was used
- time_duration td(hour,min,sec,fs);
- int precision = td.num_fractional_digits();
- // _atoi64 is an MS specific function
- if(digits >= precision) {
- // drop excess digits
- fs = _atoi64(beg->substr(0, precision).c_str());
- }
- else {
- fs = _atoi64(beg->c_str());
- }
-#else
int precision = time_duration::num_fractional_digits();
if(digits >= precision) {
// drop excess digits
@@ -106,7 +89,6 @@
else {
fs = boost::lexical_cast<boost::int64_t>(*beg);
}
-#endif
if(digits < precision){
// trailing zeros get dropped from the string,
// "1:01:01.1" would yield .000001 instead of .100000
@@ -246,22 +228,6 @@
{
std::string char_digits(ti->substr(1)); // digits w/no decimal
int digits = static_cast<int>(char_digits.length());
-
- //Works around a bug in MSVC 6 library that does not support
- //operator>> thus meaning lexical_cast will fail to compile.
-#if (defined(BOOST_MSVC) && (_MSC_VER <= 1200)) // 1200 == VC++ 6.0
- // _atoi64 is an MS specific function
- if(digits >= precision) {
- // drop excess digits
- fs = _atoi64(char_digits.substr(0, precision).c_str());
- }
- else if(digits == 0) {
- fs = 0; // just in case _atoi64 doesn't like an empty string
- }
- else {
- fs = _atoi64(char_digits.c_str());
- }
-#else
if(digits >= precision) {
// drop excess digits
fs = boost::lexical_cast<boost::int64_t>(char_digits.substr(0, precision));
@@ -272,7 +238,6 @@
else {
fs = boost::lexical_cast<boost::int64_t>(char_digits);
}
-#endif
if(digits < precision){
// trailing zeros get dropped from the string,
// "1:01:01.1" would yield .000001 instead of .100000
Modified: trunk/boost/date_time/time_resolution_traits.hpp
==============================================================================
--- trunk/boost/date_time/time_resolution_traits.hpp Wed Sep 25 09:51:51 2013 (r85904)
+++ trunk/boost/date_time/time_resolution_traits.hpp 2013-09-25 09:52:11 EDT (Wed, 25 Sep 2013) (r85905)
@@ -62,11 +62,7 @@
template<typename frac_sec_type,
time_resolutions res,
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- boost::int64_t resolution_adjust,
-#else
typename frac_sec_type::int_type resolution_adjust,
-#endif
unsigned short frac_digits,
typename v_type = boost::int32_t >
class time_resolution_traits {
@@ -89,12 +85,7 @@
return frac_sec_type::is_adapted();
}
- //Would like this to be frac_sec_type, but some compilers complain
-#if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
- BOOST_STATIC_CONSTANT(boost::int64_t, ticks_per_second = resolution_adjust);
-#else
BOOST_STATIC_CONSTANT(fractional_seconds_type, ticks_per_second = resolution_adjust);
-#endif
static time_resolutions resolution()
{
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