summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/format')
-rw-r--r--3rdParty/Boost/src/boost/format/detail/config_macros.hpp10
-rw-r--r--3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp6
-rw-r--r--3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp6
-rw-r--r--3rdParty/Boost/src/boost/format/feed_args.hpp48
-rw-r--r--3rdParty/Boost/src/boost/format/format_class.hpp2
-rw-r--r--3rdParty/Boost/src/boost/format/format_fwd.hpp10
-rw-r--r--3rdParty/Boost/src/boost/format/internals.hpp17
-rw-r--r--3rdParty/Boost/src/boost/format/internals_fwd.hpp4
-rw-r--r--3rdParty/Boost/src/boost/format/parsing.hpp4
9 files changed, 65 insertions, 42 deletions
diff --git a/3rdParty/Boost/src/boost/format/detail/config_macros.hpp b/3rdParty/Boost/src/boost/format/detail/config_macros.hpp
index 1f01b17..44d1e86 100644
--- a/3rdParty/Boost/src/boost/format/detail/config_macros.hpp
+++ b/3rdParty/Boost/src/boost/format/detail/config_macros.hpp
@@ -46,18 +46,12 @@
#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
#define BOOST_NO_OVERLOAD_FOR_NON_CONST
#endif
-// gcc-2.95's native stringstream is not usable
-#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
-#define BOOST_FORMAT_IGNORE_STRINGSTREAM
-#endif
-
-
// **** Workaround for io streams, stlport and msvc.
#ifdef BOOST_IO_NEEDS_USING_DECLARATION
namespace boost {
using std::char_traits;
using std::basic_ostream;
namespace io {
@@ -77,12 +71,16 @@ namespace boost {
}
#endif // locale
}
// -end N.S. boost
#endif // needs_using_declaration
+#if ! defined(BOOST_NO_STD_LOCALE)
+#include <locale>
+#endif
+
// *** hide std::locale if it doesnt exist.
// this typedef is either std::locale or int, avoids placing ifdefs everywhere
namespace boost { namespace io { namespace detail {
#if ! defined(BOOST_NO_STD_LOCALE)
typedef BOOST_IO_STD locale locale_t;
diff --git a/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp b/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp
index f12e5e9..c2692c4 100644
--- a/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp
+++ b/3rdParty/Boost/src/boost/format/detail/msvc_disambiguater.hpp
@@ -11,15 +11,13 @@
// ----------------------------------------------------------------------------
#ifndef BOOST_MSVC_DISAMBIGUATER_HPP
#define BOOST_MSVC_DISAMBIGUATER_HPP
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
- // this whole header is specifically for msvc up to 7.0
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
#include <boost/format/group.hpp>
#include <ostream>
namespace boost {
namespace io {
@@ -48,9 +46,9 @@ struct disambiguater
};
} // namespace detail
} // namespace io
} // namespace boost
-#endif // -BOOST_MSVC
+#endif // -__DECCXX_VER
#endif // -BOOST_MSVC_DISAMBIGUATER_HPP
diff --git a/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp b/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp
index eb35dc1..5d435b9 100644
--- a/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp
+++ b/3rdParty/Boost/src/boost/format/detail/workarounds_stlport.hpp
@@ -10,18 +10,12 @@
// ----------------------------------------------------------------------------
#ifndef BOOST_MACROS_STLPORT_HPP
#define BOOST_MACROS_STLPORT_HPP
-#if defined(_STLPORT_VERSION) && BOOST_WORKAROUND( BOOST_MSVC, <= 1300)
-// msvc-6-stlport fails to find basic_string::append( iterator, iterator) when linking
-// might affect other MSwindows compilers
-#define BOOST_NO_STRING_APPEND
-#endif
-
// *** This should go to "boost/config/stdlib/stlport.hpp".
// If the streams are not native and there are problems with using templates
// accross namespaces, we define some macros to enable a workaround for this.
// STLport 4.5
diff --git a/3rdParty/Boost/src/boost/format/feed_args.hpp b/3rdParty/Boost/src/boost/format/feed_args.hpp
index 53243dc..dcfd955 100644
--- a/3rdParty/Boost/src/boost/format/feed_args.hpp
+++ b/3rdParty/Boost/src/boost/format/feed_args.hpp
@@ -67,15 +67,14 @@ namespace detail {
res.append(beg, size);
if(n_after) res.append(static_cast<size_type>(n_after), fill_char);
}
} // -mk_str(..)
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
-// MSVC needs to be tricked to disambiguate this simple overload..
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+// __DECCXX needs to be tricked to disambiguate this simple overload..
// the trick is in "boost/format/msvc_disambiguater.hpp"
template< class Ch, class Tr, class T> inline
void put_head (BOOST_IO_STD basic_ostream<Ch, Tr> & os, const T& x ) {
disambiguater<Ch, Tr, T>::put_head(os, x, 1L);
}
@@ -112,13 +111,46 @@ namespace detail {
template< class Ch, class Tr, class T> inline
void put_last( BOOST_IO_STD basic_ostream<Ch, Tr> & os, T& x) {
os << x ;
}
#endif
-#endif // -msvc workaround
+#endif // -__DECCXX workaround
+
+ template< class Ch, class Tr, class T>
+ void call_put_head(BOOST_IO_STD basic_ostream<Ch, Tr> & os, const void* x) {
+ put_head(os, *(typename ::boost::remove_reference<T>::type*)x);
+ }
+
+ template< class Ch, class Tr, class T>
+ void call_put_last(BOOST_IO_STD basic_ostream<Ch, Tr> & os, const void* x) {
+ put_last(os, *(T*)x);
+ }
+
+ template< class Ch, class Tr>
+ struct put_holder {
+ template<class T>
+ put_holder(T& t)
+ : arg(&t),
+ put_head(&call_put_head<Ch, Tr, T>),
+ put_last(&call_put_last<Ch, Tr, T>)
+ {}
+ const void* arg;
+ void (*put_head)(BOOST_IO_STD basic_ostream<Ch, Tr> & os, const void* x);
+ void (*put_last)(BOOST_IO_STD basic_ostream<Ch, Tr> & os, const void* x);
+ };
+
+ template< class Ch, class Tr> inline
+ void put_head( BOOST_IO_STD basic_ostream<Ch, Tr> & os, const put_holder<Ch, Tr>& t) {
+ t.put_head(os, t.arg);
+ }
+
+ template< class Ch, class Tr> inline
+ void put_last( BOOST_IO_STD basic_ostream<Ch, Tr> & os, const put_holder<Ch, Tr>& t) {
+ t.put_last(os, t.arg);
+ }
template< class Ch, class Tr, class Alloc, class T>
void put( T x,
const format_item<Ch, Tr, Alloc>& specs,
typename basic_format<Ch, Tr, Alloc>::string_type& res,
@@ -255,22 +287,28 @@ namespace detail {
}
}
}
template<class Ch, class Tr, class Alloc, class T>
basic_format<Ch, Tr, Alloc>&
- feed (basic_format<Ch,Tr, Alloc>& self, T x) {
+ feed_impl (basic_format<Ch,Tr, Alloc>& self, T x) {
if(self.dumped_) self.clear();
distribute<Ch, Tr, Alloc, T> (self, x);
++self.cur_arg_;
if(self.bound_.size() != 0) {
while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] )
++self.cur_arg_;
}
return self;
}
+
+ template<class Ch, class Tr, class Alloc, class T> inline
+ basic_format<Ch, Tr, Alloc>&
+ feed (basic_format<Ch,Tr, Alloc>& self, T x) {
+ return feed_impl<Ch, Tr, Alloc, const put_holder<Ch, Tr>&>(self, put_holder<Ch, Tr>(x));
+ }
} // namespace detail
} // namespace io
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/format/format_class.hpp b/3rdParty/Boost/src/boost/format/format_class.hpp
index 4555e56..2ac59ef 100644
--- a/3rdParty/Boost/src/boost/format/format_class.hpp
+++ b/3rdParty/Boost/src/boost/format/format_class.hpp
@@ -123,13 +123,13 @@ namespace boost {
operator<<( std::ostream & ,
const basic_format<Ch2, Tr2, Alloc2>& );
#endif
template<class Ch2, class Tr2, class Alloc2, class T>
friend basic_format<Ch2, Tr2, Alloc2>&
- io::detail::feed (basic_format<Ch2, Tr2, Alloc2>&, T);
+ io::detail::feed_impl (basic_format<Ch2, Tr2, Alloc2>&, T);
template<class Ch2, class Tr2, class Alloc2, class T> friend
void io::detail::distribute (basic_format<Ch2, Tr2, Alloc2>&, T);
template<class Ch2, class Tr2, class Alloc2, class T> friend
basic_format<Ch2, Tr2, Alloc2>&
diff --git a/3rdParty/Boost/src/boost/format/format_fwd.hpp b/3rdParty/Boost/src/boost/format/format_fwd.hpp
index be3228a..16b8565 100644
--- a/3rdParty/Boost/src/boost/format/format_fwd.hpp
+++ b/3rdParty/Boost/src/boost/format/format_fwd.hpp
@@ -18,24 +18,18 @@
#include <boost/format/detail/compat_workarounds.hpp>
namespace boost {
template <class Ch,
-#if !( BOOST_WORKAROUND(__GNUC__, <3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) )
- // gcc-2.95's native stdlid needs special treatment
- class Tr = BOOST_IO_STD char_traits<Ch>, class Alloc = std::allocator<Ch> >
-#else
- class Tr = std::string_char_traits<Ch>, class Alloc = std::alloc >
-#endif
+ class Tr = BOOST_IO_STD char_traits<Ch>, class Alloc = std::allocator<Ch> >
class basic_format;
typedef basic_format<char > format;
-#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) \
- && !defined(BOOST_FORMAT_IGNORE_STRINGSTREAM)
+#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF)
typedef basic_format<wchar_t > wformat;
#endif
namespace io {
enum format_error_bits { bad_format_string_bit = 1,
too_few_args_bit = 2, too_many_args_bit = 4,
diff --git a/3rdParty/Boost/src/boost/format/internals.hpp b/3rdParty/Boost/src/boost/format/internals.hpp
index b0d874a..1c67006 100644
--- a/3rdParty/Boost/src/boost/format/internals.hpp
+++ b/3rdParty/Boost/src/boost/format/internals.hpp
@@ -101,30 +101,31 @@ namespace detail {
//--- Definitions ------------------------------------------------------------
// - stream_format_state:: -------------------------------------------------
template<class Ch, class Tr>
void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os,
boost::io::detail::locale_t * loc_default) const {
+ // If a locale is available, set it first. "os.fill(fill_);" may chrash otherwise.
+#if !defined(BOOST_NO_STD_LOCALE)
+ if(loc_)
+ os.imbue(loc_.get());
+ else if(loc_default)
+ os.imbue(*loc_default);
+#else
+ (void) loc_default; // keep compiler quiet if we don't support locales
+#endif
// set the state of this stream according to our params
if(width_ != -1)
os.width(width_);
if(precision_ != -1)
os.precision(precision_);
if(fill_ != 0)
os.fill(fill_);
os.flags(flags_);
os.clear(rdstate_);
os.exceptions(exceptions_);
-#if !defined(BOOST_NO_STD_LOCALE)
- if(loc_)
- os.imbue(loc_.get());
- else if(loc_default)
- os.imbue(*loc_default);
-#else
- (void) loc_default; // keep compiler quiet if we don't support locales
-#endif
}
template<class Ch, class Tr>
void stream_format_state<Ch,Tr>:: set_by_stream(const basic_ios& os) {
// set our params according to the state of this stream
flags_ = os.flags();
diff --git a/3rdParty/Boost/src/boost/format/internals_fwd.hpp b/3rdParty/Boost/src/boost/format/internals_fwd.hpp
index e44eb3c..18cf122 100644
--- a/3rdParty/Boost/src/boost/format/internals_fwd.hpp
+++ b/3rdParty/Boost/src/boost/format/internals_fwd.hpp
@@ -47,12 +47,16 @@ namespace detail {
template<class Ch, class Tr, class Alloc, class T>
void distribute (basic_format<Ch,Tr, Alloc>& self, T x);
template<class Ch, class Tr, class Alloc, class T>
basic_format<Ch, Tr, Alloc>&
feed (basic_format<Ch,Tr, Alloc>& self, T x);
+
+ template<class Ch, class Tr, class Alloc, class T>
+ basic_format<Ch, Tr, Alloc>&
+ feed_impl (basic_format<Ch,Tr, Alloc>& self, T x);
} // namespace detail
} // namespace io
} // namespace boost
diff --git a/3rdParty/Boost/src/boost/format/parsing.hpp b/3rdParty/Boost/src/boost/format/parsing.hpp
index b14ca82..3ff1828 100644
--- a/3rdParty/Boost/src/boost/format/parsing.hpp
+++ b/3rdParty/Boost/src/boost/format/parsing.hpp
@@ -387,17 +387,13 @@ namespace detail {
return num_items;
}
template<class String> inline
void append_string(String& dst, const String& src,
const typename String::size_type beg,
const typename String::size_type end) {
-#if !defined(BOOST_NO_STRING_APPEND)
dst.append(src.begin()+beg, src.begin()+end);
-#else
- dst += src.substr(beg, end-beg);
-#endif
}
} // detail namespace
} // io namespace