Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86061 - in trunk/boost/spirit/home/classic: core core/non_terminal core/non_terminal/impl core/primitives/impl dynamic phoenix tree
From: steveire_at_[hidden]
Date: 2013-09-30 11:56:04


Author: skelly
Date: 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013)
New Revision: 86061
URL: http://svn.boost.org/trac/boost/changeset/86061

Log:
Spirit: Remove obsolete GCC version checks.

Text files modified:
   trunk/boost/spirit/home/classic/core/config.hpp | 4 -
   trunk/boost/spirit/home/classic/core/non_terminal/grammar.hpp | 1
   trunk/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp | 24 +--------
   trunk/boost/spirit/home/classic/core/primitives/impl/primitives.ipp | 94 +--------------------------------------
   trunk/boost/spirit/home/classic/dynamic/stored_rule.hpp | 6 --
   trunk/boost/spirit/home/classic/phoenix/special_ops.hpp | 68 ++--------------------------
   trunk/boost/spirit/home/classic/tree/common.hpp | 3 -
   7 files changed, 15 insertions(+), 185 deletions(-)

Modified: trunk/boost/spirit/home/classic/core/config.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/core/config.hpp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/core/config.hpp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -48,9 +48,7 @@
 // pages and pages of compiler error messages.
 //
 /////////////////////////////////////////////////////////////////////////////////
-#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \
- || (defined(__GNUC__) && (__GNUC__ < 3)) \
- || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
+#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570))
 # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>"
 #else
 // Pass... Compiler supported.

Modified: trunk/boost/spirit/home/classic/core/non_terminal/grammar.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/core/non_terminal/grammar.hpp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/core/non_terminal/grammar.hpp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -79,7 +79,6 @@
 }} // namespace BOOST_SPIRIT_CLASSIC_NS
 
 #undef BOOST_SPIRIT_GRAMMAR_ID
-#undef BOOST_SPIRIT_GRAMMAR_ACCESS
 #undef BOOST_SPIRIT_GRAMMAR_STATE
 #endif
 

Modified: trunk/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp
==============================================================================
--- trunk/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -108,8 +108,7 @@
     //////////////////////////////////
     struct grammartract_helper_list;
 
-#if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE) \
- && (!defined(__GNUC__) || (__GNUC__ > 2))
+#if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE)
 
     struct grammartract_helper_list
     {
@@ -148,11 +147,7 @@
         define(grammar_t const* target_grammar)
         {
             grammar_helper_list<GrammarT> &helpers =
-#if !defined(__GNUC__) || (__GNUC__ > 2)
- grammartract_helper_list::do_(target_grammar);
-#else
- target_grammar->helpers;
-#endif
+ grammartract_helper_list::do_(target_grammar);
             typename grammar_t::object_id id = target_grammar->get_object_id();
 
             if (definitions.size()<=id)
@@ -296,11 +291,7 @@
         typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
 
         helper_list_t& helpers =
-# if !defined(__GNUC__) || (__GNUC__ > 2)
- grammartract_helper_list::do_(self);
-# else
- self->helpers;
-# endif
+ grammartract_helper_list::do_(self);
 
 # if defined(BOOST_INTEL_CXX_VERSION)
         for (iterator_t i = helpers.rbegin(); i != helpers.rend(); ++i)
@@ -368,16 +359,9 @@
 #endif
 
 ///////////////////////////////////////
-#if !defined(__GNUC__) || (__GNUC__ > 2)
-#define BOOST_SPIRIT_GRAMMAR_ACCESS private:
-#else
-#define BOOST_SPIRIT_GRAMMAR_ACCESS
-#endif
-
-///////////////////////////////////////
 #if !defined(BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE)
 #define BOOST_SPIRIT_GRAMMAR_STATE \
- BOOST_SPIRIT_GRAMMAR_ACCESS \
+ private: \
     friend struct impl::grammartract_helper_list; \
     mutable impl::grammar_helper_list<self_t> helpers;
 #else

Modified: trunk/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
==============================================================================
--- trunk/boost/spirit/home/classic/core/primitives/impl/primitives.ipp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/core/primitives/impl/primitives.ipp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -10,21 +10,12 @@
 #if !defined(BOOST_SPIRIT_PRIMITIVES_IPP)
 #define BOOST_SPIRIT_PRIMITIVES_IPP
 
-// This should eventually go to a config file.
-#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(_STLPORT_VERSION)
-# ifndef BOOST_SPIRIT_NO_CHAR_TRAITS
-# define BOOST_SPIRIT_NO_CHAR_TRAITS
-# endif
-#endif
-
 #include <cctype>
 #if !defined(BOOST_NO_CWCTYPE)
 #include <cwctype>
 #endif
 
-#ifndef BOOST_SPIRIT_NO_CHAR_TRAITS
-# include <string> // char_traits
-#endif
+#include <string> // char_traits
 
 #if defined(BOOST_MSVC)
 # pragma warning (push)
@@ -79,80 +70,6 @@
     //
     ///////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_SPIRIT_NO_CHAR_TRAITS
-# define BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE std
-#else
-
- template <typename CharT>
- struct char_traits
- {
- typedef CharT int_type;
- typedef CharT char_type;
- };
-
- template<>
- struct char_traits<char>
- {
- typedef int int_type;
- typedef char char_type;
-
- static char_type
- to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
- }
-
- static int
- to_int_type(char c)
- {
- return static_cast<unsigned char>(c);
- }
- };
-
- template<>
- struct char_traits<unsigned char>
- {
- typedef int int_type;
- typedef unsigned char char_type;
-
- static char_type
- to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
- }
-
- static int
- to_int_type(unsigned char c)
- {
- return c;
- }
- };
-
-# define BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE impl
-# ifndef BOOST_NO_CWCTYPE
-
- template<>
- struct char_traits<wchar_t>
- {
- typedef wint_t int_type;
- typedef wchar_t char_type;
-
- static char_type
- to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
- }
-
- static wint_t
- to_int_type(wchar_t c)
- {
- return c;
- }
- };
-
-# endif
-#endif // BOOST_SPIRIT_NO_CHAR_TRAITS
-
         // Use char_traits for char and wchar_t only, as these are the only
         // specializations provided in the standard. Other types are on their
         // own.
@@ -182,19 +99,16 @@
         struct char_type_char_traits_helper
         {
             typedef CharT char_type;
- typedef typename BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE
- ::char_traits<CharT>::int_type int_type;
+ typedef typename std::char_traits<CharT>::int_type int_type;
 
             static int_type to_int_type(CharT c)
             {
- return BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE
- ::char_traits<CharT>::to_int_type(c);
+ return std::char_traits<CharT>::to_int_type(c);
             }
 
             static char_type to_char_type(int_type i)
             {
- return BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE
- ::char_traits<CharT>::to_char_type(i);
+ return std::char_traits<CharT>::to_char_type(i);
             }
         };
 

Modified: trunk/boost/spirit/home/classic/dynamic/stored_rule.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/dynamic/stored_rule.hpp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/dynamic/stored_rule.hpp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -101,17 +101,11 @@
         friend class impl::rule_base_access;
         friend class stored_rule<T0, T1, T2, !EmbedByValue>;
 
-#if defined(__GNUC__) && (__GNUC__ < 3)
- public:
-#endif
         abstract_parser_t*
         get() const
         {
             return ptr.get();
         }
-#if defined(__GNUC__) && (__GNUC__ < 3)
- private:
-#endif
 
         stored_rule(shared_ptr<abstract_parser_t> const& ptr)
         : ptr(ptr) {}

Modified: trunk/boost/spirit/home/classic/phoenix/special_ops.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/phoenix/special_ops.hpp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/phoenix/special_ops.hpp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -79,31 +79,6 @@
 // specializations for std::istream
 //
 ///////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUC__) && (__GNUC__ < 3)
- #if defined(_STLPORT_VERSION)
- #define PHOENIX_ISTREAM _IO_istream_withassign
- #else
- #define PHOENIX_ISTREAM PHOENIX_STD::_IO_istream_withassign
- #endif
-#else
-// #if (defined(__ICL) && defined(_STLPORT_VERSION))
-// #define PHOENIX_ISTREAM istream_withassign
-// #else
- #define PHOENIX_ISTREAM PHOENIX_STD::istream
-// #endif
-#endif
-
-//////////////////////////////////
-#if defined(__GNUC__) && (__GNUC__ < 3)
-// || (defined(__ICL) && defined(_STLPORT_VERSION))
-template <typename T1>
-struct binary_operator<shift_r_op, PHOENIX_ISTREAM, T1>
-{
- typedef PHOENIX_STD::istream& result_type;
- static result_type eval(PHOENIX_STD::istream& out, T1& rhs)
- { return out >> rhs; }
-};
-#endif
 
 //////////////////////////////////
 template <typename T1>
@@ -117,45 +92,19 @@
 //////////////////////////////////
 template <typename BaseT>
 inline typename impl::make_binary3
- <shift_r_op, variable<PHOENIX_ISTREAM>, BaseT>::type
-operator>>(PHOENIX_ISTREAM& _0, actor<BaseT> const& _1)
+ <shift_r_op, variable<PHOENIX_STD::istream>, BaseT>::type
+operator>>(PHOENIX_STD::istream& _0, actor<BaseT> const& _1)
 {
     return impl::make_binary3
- <shift_r_op, variable<PHOENIX_ISTREAM>, BaseT>
+ <shift_r_op, variable<PHOENIX_STD::istream>, BaseT>
     ::construct(var(_0), _1);
 }
 
-#undef PHOENIX_ISTREAM
 ///////////////////////////////////////////////////////////////////////////////
 //
 // specializations for std::ostream
 //
 ///////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUC__) && (__GNUC__ < 3)
- #if defined(_STLPORT_VERSION)
- #define PHOENIX_OSTREAM _IO_ostream_withassign
- #else
- #define PHOENIX_OSTREAM PHOENIX_STD::_IO_ostream_withassign
- #endif
-#else
-// #if (defined(__ICL) && defined(_STLPORT_VERSION))
-// #define PHOENIX_OSTREAM ostream_withassign
-// #else
- #define PHOENIX_OSTREAM PHOENIX_STD::ostream
-// #endif
-#endif
-
-//////////////////////////////////
-#if defined(__GNUC__) && (__GNUC__ < 3)
-// || (defined(__ICL) && defined(_STLPORT_VERSION))
-template <typename T1>
-struct binary_operator<shift_l_op, PHOENIX_OSTREAM, T1>
-{
- typedef PHOENIX_STD::ostream& result_type;
- static result_type eval(PHOENIX_STD::ostream& out, T1 const& rhs)
- { return out << rhs; }
-};
-#endif
 
 //////////////////////////////////
 template <typename T1>
@@ -169,16 +118,14 @@
 //////////////////////////////////
 template <typename BaseT>
 inline typename impl::make_binary3
- <shift_l_op, variable<PHOENIX_OSTREAM>, BaseT>::type
-operator<<(PHOENIX_OSTREAM& _0, actor<BaseT> const& _1)
+ <shift_l_op, variable<PHOENIX_STD::ostream>, BaseT>::type
+operator<<(PHOENIX_STD::ostream& _0, actor<BaseT> const& _1)
 {
     return impl::make_binary3
- <shift_l_op, variable<PHOENIX_OSTREAM>, BaseT>
+ <shift_l_op, variable<PHOENIX_STD::ostream>, BaseT>
     ::construct(var(_0), _1);
 }
 
-#undef PHOENIX_OSTREAM
-
 ///////////////////////////////////////////////////////////////////////////////
 //
 // specializations for std::strstream / stringstream
@@ -228,8 +175,6 @@
 // I/O manipulator specializations
 //
 ///////////////////////////////////////////////////////////////////////////////
-#if (!defined(__GNUC__) || (__GNUC__ > 2))
-// && !(defined(__ICL) && defined(_STLPORT_VERSION))
 
 typedef PHOENIX_STD::ios_base& (*iomanip_t)(PHOENIX_STD::ios_base&);
 typedef PHOENIX_STD::istream& (*imanip_t)(PHOENIX_STD::istream&);
@@ -300,7 +245,6 @@
 }
 
 #endif // __BORLANDC__
-#endif // !defined(__GNUC__) || (__GNUC__ > 2)
 
 ///////////////////////////////////////////////////////////////////////////////
 //

Modified: trunk/boost/spirit/home/classic/tree/common.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/tree/common.hpp Mon Sep 30 11:55:29 2013 (r86060)
+++ trunk/boost/spirit/home/classic/tree/common.hpp 2013-09-30 11:56:04 EDT (Mon, 30 Sep 2013) (r86061)
@@ -520,9 +520,6 @@
     // as Koenig lookup rules will find only the classname::swap
     // member function not the global declaration, so use cp_swap
     // as a forwarding function (JM):
-#if __GNUC__ == 2
- using ::std::swap;
-#endif
     template <typename T>
     inline void cp_swap(T& t1, T& t2)
     {


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