]> git.lyx.org Git - features.git/commitdiff
Update to latest from boost 1.34 cvs release branch
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 15 Oct 2006 14:37:06 +0000 (14:37 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 15 Oct 2006 14:37:06 +0000 (14:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15337 a592a061-630c-0410-9148-cb99ea01b6c8

16 files changed:
boost/boost/any.hpp
boost/boost/bind.hpp
boost/boost/config/platform/hpux.hpp
boost/boost/detail/indirect_traits.hpp
boost/boost/function/function_base.hpp
boost/boost/function/function_template.hpp
boost/boost/regex/v4/perl_matcher.hpp
boost/boost/regex/v4/perl_matcher_recursive.hpp
boost/boost/regex/v4/regex_traits_defaults.hpp
boost/boost/signals/detail/named_slot_map.hpp
boost/boost/signals/signal_template.hpp
boost/boost/spirit/iterator/impl/position_iterator.ipp
boost/boost/spirit/iterator/position_iterator.hpp
boost/boost/spirit/version.hpp
boost/boost/type_traits/integral_constant.hpp
boost/libs/signals/src/named_slot_map.cpp

index fe8553201ba6fc86272fc64e06a69dbf6faef1e4..ad3f211f692284a362c06dd3131f19cb8008f38a 100644 (file)
@@ -217,15 +217,15 @@ namespace boost
     // use typeid() comparison, e.g., when our types may travel across
     // different shared libraries.
     template<typename ValueType>
-    ValueType * unsafe_any_cast(any * operand)
+    inline ValueType * unsafe_any_cast(any * operand)
     {
         return &static_cast<any::holder<ValueType> *>(operand->content)->held;
     }
 
     template<typename ValueType>
-    const ValueType * unsafe_any_cast(const any * operand)
+    inline const ValueType * unsafe_any_cast(const any * operand)
     {
-        return any_cast<ValueType>(const_cast<any *>(operand));
+        return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
     }
 }
 
index bece8a7af3e39a8765ef6ca345114ffd63fdf5bb..6979fecd0576d99747a78e4c3b2b61b3482102bc 100644 (file)
@@ -1161,7 +1161,8 @@ BOOST_BIND_OPERATOR( >=, greater_equal )
 
 // visit_each, ADL
 
-#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
+#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \
+   && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
 
 template<class V, class T> void visit_each( V & v, value<T> const & t, int )
 {
@@ -1180,7 +1181,8 @@ template<class V, class R, class F, class L> void visit_each( V & v, bind_t<R, F
 
 // visit_each, no ADL
 
-#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ )
+#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \
+  || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
 
 template<class V, class T> void visit_each( V & v, _bi::value<T> const & t, int )
 {
index 879fa00bfd53ce5da1f32e0eb6d21a3fa4747dae..57566b701576b3c92404c10a899d8fe0e7cd9b87 100644 (file)
@@ -35,6 +35,8 @@
 #     define BOOST_HAS_THREADS
 #     define BOOST_HAS_PTHREADS
 #  endif
+#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS)
+#  define BOOST_HAS_PTHREADS
 #endif
 
 // boilerplate code:
@@ -80,3 +82,4 @@
 #endif
 
 
+
index 6ee8a10a49620a66cf23d2e34efdd8d9ee63109d..9b22d6b1792dcf5b35438ff0e1ea88a8c0048274 100644 (file)
@@ -388,27 +388,27 @@ typename is_pointer_help<V>::type reference_to_pointer_helper(V&);
 outer_no_type reference_to_pointer_helper(...);
 
 template <class T>
-struct is_reference_to_pointer
+struct reference_to_pointer_impl
 {
     static T t;
     BOOST_STATIC_CONSTANT(
         bool, value
-        = (is_reference<T>::value
-           && sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type))
+        = (sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type))
         );
     
     typedef mpl::bool_<value> type;
-    
+};
+   
+template <class T>
+struct is_reference_to_pointer
+  : mpl::eval_if<is_reference<T>, reference_to_pointer_impl<T>, mpl::false_>::type
+{   
     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_pointer,(T))
 };
 
 template <class T>
 struct is_reference_to_function_pointer
-    : mpl::if_<
-          is_reference<T>
-        , is_pointer_to_function_aux<T>
-        , mpl::bool_<false>
-     >::type
+  : mpl::eval_if<is_reference<T>, is_pointer_to_function_aux<T>, mpl::false_>::type
 {
     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T))
 };
index ae83343c794382edbad1e843fb45308338d22bd7..7165434c0ffe12eb0cba57c2d7e00cdb6ffb2e69 100644 (file)
@@ -284,10 +284,8 @@ namespace boost {
               reinterpret_cast<const functor_type*>(&in_buffer.data);
             new ((void*)&out_buffer.data) functor_type(*in_functor);
           } else if (op == destroy_functor_tag) {
-            functor_type* out_functor = 
-              reinterpret_cast<functor_type*>(&out_buffer.data);
             // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
-            out_functor->~Functor();
+            reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
           } else /* op == check_functor_type_tag */ {
             const std::type_info& check_type = 
               *static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
index 3aacea1cf50a1ac74bb82a3208a9fa21823c2e57..b6f786cd82fe0fbb92ca947adfb56fc537e331c1 100644 (file)
 #  define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
 #endif
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable: 4127) // conditional expression is constant.
+#endif
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable: 4127) // conditional expression is constant.
+#endif
+
 namespace boost {
   namespace detail {
     namespace function {
@@ -788,11 +798,19 @@ public:
   }
 };
 
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
 #undef BOOST_FUNCTION_PARTIAL_SPEC
 #endif // have partial specialization
 
 } // end namespace boost
 
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
 // Cleanup after ourselves...
 #undef BOOST_FUNCTION_VTABLE
 #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
index 15d284d0d3a7db350bb9662c9669d408b39fde11..d68943cd10a2dbd7766b4b50c2409f3a19d6777a 100644 (file)
@@ -49,7 +49,7 @@ inline bool can_start(unsigned short c, const unsigned char* map, unsigned char
 {
    return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
 }
-#if !defined(__HP_aCC)
+#if !defined(__hpux) // can't use WCHAR_MIN in pp-directive
 #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
 inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
 {
index 7e857963feef9b01f33a287bef4a29eaf4937efc..1e98b34286c20025a210b1fbd69fc3f4e8c2bc96 100644 (file)
@@ -275,13 +275,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
 #pragma warning(disable:4127 4244)
 #endif
    const re_repeat* rep = static_cast<const re_repeat*>(pstate);
-   if(next_count->get_id() != rep->id)
-   {
-      // we're moving to a different repeat from the last
-      // one, so set up a counter object and recurse:
-      repeater_count<BidiIterator> r(rep->id, &next_count, position);
-      return match_rep();
-   }
+   //
+   // Always copy the repeat count, so that the state is restored
+   // when we exit this scope:
+   //
+   repeater_count<BidiIterator> r(rep->id, &next_count, position);
    //
    // If we've had at least one repeat already, and the last one 
    // matched the NULL string then set the repeat count to
index 44b9aed844d15fdfd703ce751dac815e9b646969..cc1df915364e1694161afec4e96923161407b524 100644 (file)
@@ -77,7 +77,7 @@ inline bool is_combining<unsigned char>(unsigned char)
 {
    return false;
 }
-#ifndef __HP_aCC
+#ifndef __hpux // can't use WCHAR_MIN/MAX in pp-directives.
 #ifdef _MSC_VER 
 template<>
 inline bool is_combining<wchar_t>(wchar_t c)
index 815406d6d81f8b0f6cc103aaf8dfcbc5117aeacc..3592f4c1d672fb298b96cf4601a5b8f0aa74e504 100644 (file)
@@ -60,7 +60,8 @@ public:
   typedef const stored_group& first_argument_type;
   typedef const stored_group& second_argument_type;
 
-  group_bridge_compare(const Compare& c) : comp(c) {}
+  group_bridge_compare(const Compare& c) : comp(c) 
+  { }
 
   bool operator()(const stored_group& k1, const stored_group& k2) const
   {
@@ -92,13 +93,39 @@ class BOOST_SIGNALS_DECL named_slot_map_iterator :
                           connection_slot_pair,
                           forward_traversal_tag> inherited;
 public:
-  named_slot_map_iterator();
-  named_slot_map_iterator(const named_slot_map_iterator&);
-  named_slot_map_iterator& operator=(const named_slot_map_iterator&);
-
-  connection_slot_pair& dereference() const;
-  void increment();
-  bool equal(const named_slot_map_iterator& other) const;
+  named_slot_map_iterator() : slot_assigned(false) 
+  { }
+  named_slot_map_iterator(const named_slot_map_iterator& other) 
+    : group(other.group), last_group(other.last_group),
+    slot_assigned(other.slot_assigned)
+  {
+    if (slot_assigned) slot_ = other.slot_;
+  }
+  named_slot_map_iterator& operator=(const named_slot_map_iterator& other) 
+  {
+    slot_assigned = other.slot_assigned;
+    group = other.group;
+    last_group = other.last_group;
+    if (slot_assigned) slot_ = other.slot_;
+    return *this;
+  }
+  connection_slot_pair& dereference() const 
+  {
+    return *slot_;
+  }
+  void increment() 
+  {
+    ++slot_;
+    if (slot_ == group->second.end()) {
+      ++group;
+      init_next_group();
+    }
+  }
+  bool equal(const named_slot_map_iterator& other) const {
+    return (group == other.group
+           && (group == last_group
+               || slot_ == other.slot_));
+  }
 
 #if BOOST_WORKAROUND(_MSC_VER, <= 1400)
   void decrement();
index e4017ec8ae14f3f920bf71a1be55e6550d467906..a8420b691400cfb3b9f47ae43f829f7156896aa9 100644 (file)
@@ -210,7 +210,7 @@ namespace boost {
             BOOST_SIGNALS_NAMESPACE::connect_position at
               = BOOST_SIGNALS_NAMESPACE::at_back);
 
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 0x1700)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
     // MSVC 6.0 and 7.0 don't handle the is_convertible test well
     void disconnect(const group_type& group)
     {
index 37e1d7d986952046eaabd783fd865dea1c80905e..fd97041b2a4a3b66036ca31f14afc5f1badae962 100644 (file)
@@ -1,6 +1,6 @@
 /*=============================================================================
     Copyright (c) 2002 Juan Carlos Arevalo-Baeza
-    Copyright (c) 2002-2003 Hartmut Kaiser
+    Copyright (c) 2002-2006 Hartmut Kaiser
     Copyright (c) 2003 Giovanni Bajo
     http://spirit.sourceforge.net/
 
@@ -29,18 +29,18 @@ namespace boost { namespace spirit {
 //  newlines since no column tracking is needed.
 //
 ///////////////////////////////////////////////////////////////////////////////
-template <>
-class position_policy<file_position_without_column> {
+template <typename String>
+class position_policy<file_position_without_column_base<String> > {
 
 public:
-    void next_line(file_position_without_column& pos)
+    void next_line(file_position_without_column_base<String>& pos)
     {
         ++pos.line;
     }
 
     void set_tab_chars(unsigned int /*chars*/){}
-    void next_char(file_position_without_column& /*pos*/)    {}
-    void tabulation(file_position_without_column& /*pos*/)   {}
+    void next_char(file_position_without_column_base<String>& /*pos*/)    {}
+    void tabulation(file_position_without_column_base<String>& /*pos*/)   {}
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -54,15 +54,15 @@ public:
 //  of position_iterator.
 //
 ///////////////////////////////////////////////////////////////////////////////
-template <>
-class position_policy<file_position> {
+template <typename String>
+class position_policy<file_position_base<String> > {
 
 public:
     position_policy()
         : m_CharsPerTab(4)
     {}
 
-    void next_line(file_position& pos)
+    void next_line(file_position_base<String>& pos)
     {
         ++pos.line;
         pos.column = 1;
@@ -73,12 +73,12 @@ public:
         m_CharsPerTab = chars;
     }
 
-    void next_char(file_position& pos)
+    void next_char(file_position_base<String>& pos)
     {
         ++pos.column;
     }
 
-    void tabulation(file_position& pos)
+    void tabulation(file_position_base<String>& pos)
     {
         pos.column += m_CharsPerTab - (pos.column - 1) % m_CharsPerTab;
     }
index 746e3bdb66504c79ea0b5fea52bda274a6bda21a..19cf316bd72fb2b0c94cd20275eaf4d885b1ee73 100644 (file)
@@ -1,6 +1,6 @@
 /*=============================================================================
     Copyright (c) 2002 Juan Carlos Arevalo-Baeza
-    Copyright (c) 2002-2003 Hartmut Kaiser
+    Copyright (c) 2002-2006 Hartmut Kaiser
     Copyright (c) 2003 Giovanni Bajo
     http://spirit.sourceforge.net/
 
@@ -27,17 +27,18 @@ namespace boost { namespace spirit {
 //  and the line number
 //
 ///////////////////////////////////////////////////////////////////////////////
-struct file_position_without_column {
-    std::string file;
+template <typename String>
+struct file_position_without_column_base {
+    String file;
     int line;
 
-    file_position_without_column(std::string const& file_ = std::string(),
+    file_position_without_column_base(String const& file_ = String(),
                   int line_ = 1):
         file    (file_),
         line    (line_)
     {}
 
-    bool operator==(const file_position_without_column& fp) const
+    bool operator==(const file_position_without_column_base& fp) const
     { return line == fp.line && file == fp.file; }
 };
 
@@ -49,20 +50,20 @@ struct file_position_without_column {
 //  line and column number
 //
 ///////////////////////////////////////////////////////////////////////////////
-struct file_position : public file_position_without_column {
+template <typename String>
+struct file_position_base : public file_position_without_column_base<String> {
     int column;
 
-    file_position(std::string const& file_ = std::string(),
-                  int line_ = 1, int column_ = 1):
-        file_position_without_column (file_, line_),
+    file_position_base(String const& file_ = String(),
+                       int line_ = 1, int column_ = 1):
+        file_position_without_column_base<String> (file_, line_),
         column                       (column_)
     {}
 
-    bool operator==(const file_position& fp) const
-    { return column == fp.column && line == fp.line && file == fp.file; }
+    bool operator==(const file_position_base& fp) const
+    { return column == fp.column && this->line == fp.line && this->file == fp.file; }
 };
 
-
 ///////////////////////////////////////////////////////////////////////////////
 //
 //  position_policy<>
index 91bad02bf3b80f6d8d610f04595c46817a2f9660..48c1f86b9eaa43936ec761c61f6787da2d62d617 100644 (file)
@@ -25,7 +25,7 @@
 //  This is the version of the current Spirit distribution
 //
 ///////////////////////////////////////////////////////////////////////////////
-#define SPIRIT_VERSION 0x1803
+#define SPIRIT_VERSION 0x1804
 #define SPIRIT_PIZZA_VERSION SPIRIT_DOUBLE_CHEESE  // :-)
 
 #endif // defined(SPIRIT_VERSION_HPP)
index 0a6450a3b6e0b518aecce44f9720d0c334117f43..4ed1bb058fc80f3acf83d2d3bbff1b730fb44a6d 100644 (file)
@@ -19,42 +19,7 @@ template <class T, T val>
 #endif
 struct integral_constant : public mpl::integral_c<T, val>
 {
-   //BOOST_STATIC_CONSTANT(T, value = val);
-   //typedef T value_type;
    typedef integral_constant<T,val> type;
-
-#if 0
-   //
-   // everything that follows now, is MPL-compatibility code:
-   //
-   typedef ::boost::mpl::integral_c_tag tag;
-
-   // have to #ifdef here: some compilers don't like the 'val + 1' form (MSVC),
-   // while some other don't like 'value + 1' (Borland), and some don't like
-   // either
-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
-private:
-   BOOST_STATIC_CONSTANT(T, next_value = BOOST_MPL_AUX_STATIC_CAST(T, (val + 1)));
-   BOOST_STATIC_CONSTANT(T, prior_value = BOOST_MPL_AUX_STATIC_CAST(T, (val - 1)));
-public:
-   typedef integral_constant<T,next_value> next;
-   typedef integral_constant<T,prior_value> prior;
-#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
-   || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
-   || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (val + 1)) )> next;
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (val - 1)) )> prior;
-#else
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (value + 1)) )> next;
-   typedef integral_constant<T, ( BOOST_MPL_AUX_STATIC_CAST(T, (value - 1)) )> prior;
-#endif
-
-   // enables uniform function call syntax for families of overloaded 
-   // functions that return objects of both arithmetic ('int', 'long',
-   // 'double', etc.) and wrapped integral types (for an example, see 
-   // "mpl/example/power.cpp")
-   operator T() const { return static_cast<T>(this->value); } 
-#endif
 };
 
 template<> struct integral_constant<bool,true> : public mpl::true_ 
index 88a0b6aff274b6f6a3c4b6d78836409dd852b62f..35fe2b442f3a5ed5fcdc200e6a180dd041f85865 100644 (file)
@@ -23,46 +23,6 @@ typedef std::map<stored_group, group_list, compare_type> slot_container_type;
 typedef slot_container_type::iterator group_iterator;
 typedef slot_container_type::const_iterator const_group_iterator;
 
-named_slot_map_iterator::named_slot_map_iterator() : slot_assigned(false) {}
-
-named_slot_map_iterator::
-named_slot_map_iterator(const named_slot_map_iterator& other)
-  : group(other.group), last_group(other.last_group),
-    slot_assigned(other.slot_assigned)
-{
-  if (slot_assigned) slot_ = other.slot_;
-}
-
-named_slot_map_iterator&
-named_slot_map_iterator::operator=(const named_slot_map_iterator& other)
-{
-  slot_assigned = other.slot_assigned;
-  group = other.group;
-  last_group = other.last_group;
-  if (slot_assigned) slot_ = other.slot_;
-  return *this;
-}
-
-
-connection_slot_pair& named_slot_map_iterator::dereference() const
-{ return *slot_; }
-
-void named_slot_map_iterator::increment()
-{
-  ++slot_;
-  if (slot_ == group->second.end()) {
-    ++group;
-    init_next_group();
-  }
-}
-
-bool
-named_slot_map_iterator::equal(const named_slot_map_iterator& other) const
-{
-  return (group == other.group
-          && (group == last_group
-              || slot_ == other.slot_));
-}
 
 #if BOOST_WORKAROUND(_MSC_VER, <= 1400)
 void named_slot_map_iterator::decrement() { assert(false); }