|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2007-12-24 23:38:55
Author: eric_niebler
Date: 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
New Revision: 42289
URL: http://svn.boost.org/trac/boost/changeset/42289
Log:
Merged revisions 42236-42288 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r42247 | grafik | 2007-12-22 16:32:17 -0500 (Sat, 22 Dec 2007) | 1 line
Fix time related callbacks to new arguments.
........
r42264 | ramey | 2007-12-23 15:00:03 -0500 (Sun, 23 Dec 2007) | 1 line
correction to input of zero length strings
........
r42266 | turkanis | 2007-12-23 19:27:12 -0500 (Sun, 23 Dec 2007) | 1 line
ported changes from branches/iostreams_dev revisions 42144-42265
........
r42267 | turkanis | 2007-12-23 19:37:53 -0500 (Sun, 23 Dec 2007) | 1 line
last commit accidentally included a commented out #if directive
........
r42270 | eric_niebler | 2007-12-23 22:51:59 -0500 (Sun, 23 Dec 2007) | 1 line
add missing #includes
........
r42274 | troyer | 2007-12-24 02:06:11 -0500 (Mon, 24 Dec 2007) | 1 line
removed warning
........
r42277 | niels_dekker | 2007-12-24 15:42:16 -0500 (Mon, 24 Dec 2007) | 1 line
value_init now uses aligned_storage::address(), instead of "&x", as recommended by Fernando Cacciola (by mail)
........
r42278 | niels_dekker | 2007-12-24 17:00:37 -0500 (Mon, 24 Dec 2007) | 1 line
Added value_init tests, testing copy construction and assignment.
........
Added:
branches/proto/v3/libs/iostreams/test/stream_state_test.cpp
- copied unchanged from r42278, /trunk/libs/iostreams/test/stream_state_test.cpp
Properties modified:
branches/proto/v3/ (props changed)
Text files modified:
branches/proto/v3/boost/archive/basic_binary_iprimitive.hpp | 22 --
branches/proto/v3/boost/archive/basic_text_iarchive.hpp | 10 -
branches/proto/v3/boost/archive/impl/basic_binary_iprimitive.ipp | 3
branches/proto/v3/boost/archive/impl/text_iarchive_impl.ipp | 3
branches/proto/v3/boost/iostreams/close.hpp | 110 +++++++------
branches/proto/v3/boost/iostreams/detail/enable_if_stream.hpp | 5
branches/proto/v3/boost/iostreams/detail/vc6/close.hpp | 3
branches/proto/v3/boost/utility/value_init.hpp | 24 --
branches/proto/v3/boost/xpressive/proto/operators.hpp | 2
branches/proto/v3/libs/iostreams/src/file_descriptor.cpp | 19 +
branches/proto/v3/libs/iostreams/test/Jamfile.v2 | 1
branches/proto/v3/libs/iostreams/test/code_converter_test.cpp | 302 ++++++++++++++++++++--------------------
branches/proto/v3/libs/serialization/test/test_complex.cpp | 8
branches/proto/v3/libs/utility/value_init_test.cpp | 7
branches/proto/v3/tools/build/v2/test/timedata.py | 2
branches/proto/v3/tools/build/v2/tools/testing.jam | 2
16 files changed, 260 insertions(+), 263 deletions(-)
Modified: branches/proto/v3/boost/archive/basic_binary_iprimitive.hpp
==============================================================================
--- branches/proto/v3/boost/archive/basic_binary_iprimitive.hpp (original)
+++ branches/proto/v3/boost/archive/basic_binary_iprimitive.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -137,28 +137,6 @@
void *address,
std::size_t count
){
-#if 0
- assert(
- static_cast<std::size_t>((std::numeric_limits<std::streamsize>::max)()) >= count
- );
- //if(is.fail())
- // boost::throw_exception(archive_exception(archive_exception::stream_error));
- // note: an optimizer should eliminate the following for char files
- std::size_t s = count / sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- is.read(
- static_cast<BOOST_DEDUCED_TYPENAME IStream::char_type *>(address),
- s
- );
- // note: an optimizer should eliminate the following for char files
- s = count % sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- if(0 < s){
- if(is.fail())
- boost::throw_exception(archive_exception(archive_exception::stream_error));
- BOOST_DEDUCED_TYPENAME IStream::char_type t;
- is.read(& t, 1);
- std::memcpy(address, &t, s);
- }
-#endif
// note: an optimizer should eliminate the following for char files
std::streamsize s = count / sizeof(Elem);
std::streamsize scount = m_sb.sgetn(
Modified: branches/proto/v3/boost/archive/basic_text_iarchive.hpp
==============================================================================
--- branches/proto/v3/boost/archive/basic_text_iarchive.hpp (original)
+++ branches/proto/v3/boost/archive/basic_text_iarchive.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -61,16 +61,6 @@
{
this->detail_common_iarchive::load_override(t, 0);
}
-#if 0
- // Borland compilers has a problem with strong type. Try to fix this here
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- void load_override(version_type & t, int){
- unsigned int x;
- * this->This() >> x;
- t.t = version_type(x);
- }
- #endif
-#endif
// text file don't include the optional information
void load_override(class_id_optional_type & /*t*/, int){}
Modified: branches/proto/v3/boost/archive/impl/basic_binary_iprimitive.ipp
==============================================================================
--- branches/proto/v3/boost/archive/impl/basic_binary_iprimitive.ipp (original)
+++ branches/proto/v3/boost/archive/impl/basic_binary_iprimitive.ipp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -95,7 +95,8 @@
#endif
s.resize(l);
// note breaking a rule here - could be a problem on some platform
- load_binary(&(*s.begin()), l);
+ if(0 < l)
+ load_binary(&(*s.begin()), l);
}
#ifndef BOOST_NO_CWCHAR
Modified: branches/proto/v3/boost/archive/impl/text_iarchive_impl.ipp
==============================================================================
--- branches/proto/v3/boost/archive/impl/text_iarchive_impl.ipp (original)
+++ branches/proto/v3/boost/archive/impl/text_iarchive_impl.ipp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -53,7 +53,8 @@
if(NULL != s.data())
#endif
s.resize(size);
- is.read(&(*s.begin()), size);
+ if(0 < size)
+ is.read(&(*s.begin()), size);
}
#ifndef BOOST_NO_CWCHAR
Modified: branches/proto/v3/boost/iostreams/close.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/close.hpp (original)
+++ branches/proto/v3/boost/iostreams/close.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -30,6 +30,51 @@
// Must come last.
#include <boost/iostreams/detail/config/disable_warnings.hpp>
+namespace boost { namespace iostreams {
+
+template<typename T>
+void close(T& t);
+
+template<typename T>
+void close(T& t, BOOST_IOS::openmode which);
+
+template<typename T, typename Sink>
+void close(T& t, Sink& snk, BOOST_IOS::openmode which);
+
+namespace detail {
+
+template<typename T>
+void close_all(T& t)
+{
+ try {
+ boost::iostreams::close(t, BOOST_IOS::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, BOOST_IOS::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, BOOST_IOS::out);
+}
+
+template<typename T, typename Sink>
+void close_all(T& t, Sink& snk)
+{
+ try {
+ boost::iostreams::close(t, snk, BOOST_IOS::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, snk, BOOST_IOS::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, snk, BOOST_IOS::out);
+}
+
+} // End namespaces detail.
+
+} } // End namespaces iostreams, boost.
+
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------//
# include <boost/iostreams/detail/vc6/close.hpp>
#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------//
@@ -44,29 +89,33 @@
} // End namespace detail.
template<typename T>
-void close(T& t);
+void close(T& t) { detail::close_all(t); }
template<typename T>
void close(T& t, BOOST_IOS::openmode which)
{
+#ifdef BOOST_IOSTREAMS_STRICT
assert(which == BOOST_IOS::in || which == BOOST_IOS::out);
+#else
+ if (which == (BOOST_IOS::in | BOOST_IOS::out)) {
+ detail::close_all(t);
+ return;
+ }
+#endif
detail::close_impl<T>::close(detail::unwrap(t), which);
}
-//template<typename T, typename Sink>
-//void close( T& t, Sink& snk,
-// typename
-// boost::disable_if<
-// boost::is_convertible<Sink, BOOST_IOS::openmode>
-// >::type* = 0 )
-//{
-// detail::close_all(t, snk);
-//}
-
template<typename T, typename Sink>
void close(T& t, Sink& snk, BOOST_IOS::openmode which)
{
+#ifdef BOOST_IOSTREAMS_STRICT
assert(which == BOOST_IOS::in || which == BOOST_IOS::out);
+#else
+ if (which == (BOOST_IOS::in | BOOST_IOS::out)) {
+ detail::close_all(t, snk);
+ return;
+ }
+#endif
detail::close_impl<T>::close(detail::unwrap(t), snk, which);
}
@@ -163,45 +212,6 @@
#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------//
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-void close_all(T& t)
-{
- try {
- boost::iostreams::close(t, BOOST_IOS::in);
- } catch (...) {
- try {
- boost::iostreams::close(t, BOOST_IOS::out);
- } catch (...) { }
- throw;
- }
- boost::iostreams::close(t, BOOST_IOS::out);
-}
-
-template<typename T, typename Sink>
-void close_all(T& t, Sink& snk)
-{
- try {
- boost::iostreams::close(t, snk, BOOST_IOS::in);
- } catch (...) {
- try {
- boost::iostreams::close(t, snk, BOOST_IOS::out);
- } catch (...) { }
- throw;
- }
- boost::iostreams::close(t, snk, BOOST_IOS::out);
-}
-
-} // End namespaces detail.
-
-template<typename T>
-void close(T& t) { detail::close_all(t); }
-
-} } // End iostreams, boost.
-
#include <boost/iostreams/detail/config/enable_warnings.hpp>
#endif // #ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED
Modified: branches/proto/v3/boost/iostreams/detail/enable_if_stream.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/enable_if_stream.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/enable_if_stream.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -15,9 +15,10 @@
#include <boost/utility/enable_if.hpp>
#include <boost/iostreams/traits_fwd.hpp> // is_std_io.
-#if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+#if !defined(BOOST_NO_SFINAE) && \
+ !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
# define BOOST_IOSTREAMS_ENABLE_IF_STREAM(T) \
- , typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
+ , typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
/**/
# define BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) \
, typename boost::disable_if< boost::iostreams::is_std_io<T> >::type* = 0 \
Modified: branches/proto/v3/boost/iostreams/detail/vc6/close.hpp
==============================================================================
--- branches/proto/v3/boost/iostreams/detail/vc6/close.hpp (original)
+++ branches/proto/v3/boost/iostreams/detail/vc6/close.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -14,6 +14,9 @@
} // End namespace detail.
template<typename T>
+void close(T& t) { detail::close_all(t); }
+
+template<typename T>
void close(T& t, BOOST_IOS::openmode which)
{
typedef typename detail::unwrapped_type<T>::type unwrapped;
Modified: branches/proto/v3/boost/utility/value_init.hpp
==============================================================================
--- branches/proto/v3/boost/utility/value_init.hpp (original)
+++ branches/proto/v3/boost/utility/value_init.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -5,9 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
// 21 Ago 2002 (Created) Fernando Cacciola
-// 07 Set 2007 (Worked around MSVC++ bug) Fernando Cacciola, Niels Dekker
-// 16 Nov 2007 (Refactoring: removed private base classes) Fernando Cacciola, Niels Dekker
-// 09 Dec 2007 (Worked around various compiler bugs) Fernando Cacciola, Niels Dekker
+// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker
//
#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
@@ -30,7 +28,6 @@
// clearing the bytes of T, before constructing the T object it contains.
#include <boost/aligned_storage.hpp>
-#include <boost/detail/select_type.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/type_traits/cv_traits.hpp>
#include <boost/type_traits/alignment_of.hpp>
@@ -51,17 +48,13 @@
remove_const<T>::type data;
};
- mutable
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
- typename
-#endif
- ::boost::aligned_storage<sizeof(wrapper), ::boost::alignment_of<wrapper>::value>::type x;
+ mutable aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value> x;
public :
value_initialized()
{
- std::memset(&x, 0, sizeof(x));
+ std::memset(x.address(), 0, sizeof(x));
#ifdef BOOST_MSVC
#pragma warning(push)
#if _MSC_VER >= 1310
@@ -71,7 +64,7 @@
#pragma warning(disable: 4345)
#endif
#endif
- new (&x) wrapper();
+ new (x.address()) wrapper();
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
@@ -79,8 +72,7 @@
value_initialized(value_initialized const & arg)
{
- void const * const ptr = &(arg.x);
- new (&x) wrapper( *static_cast<wrapper const *>(ptr) );
+ new (x.address()) wrapper( *static_cast<wrapper const *>(arg.x.address()) );
}
value_initialized & operator=(value_initialized const & arg)
@@ -93,14 +85,12 @@
~value_initialized()
{
- void * const ptr = &x;
- static_cast<wrapper *>(ptr)->wrapper::~wrapper();
+ static_cast<wrapper *>(x.address())->wrapper::~wrapper();
}
T& data() const
{
- void * const ptr = &x;
- return static_cast<wrapper *>(ptr)->data;
+ return static_cast<wrapper *>(x.address())->data;
}
operator T&() const { return this->data(); }
Modified: branches/proto/v3/boost/xpressive/proto/operators.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/operators.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/operators.hpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -9,9 +9,9 @@
#ifndef BOOST_PROTO_OPERATORS_HPP_EAN_10_28_2007
#define BOOST_PROTO_OPERATORS_HPP_EAN_10_28_2007
+#include <boost/mpl/assert.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/utility/enable_if.hpp>
-#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/make_expr.hpp>
#include <boost/xpressive/proto/detail/define.hpp>
Modified: branches/proto/v3/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/src/file_descriptor.cpp (original)
+++ branches/proto/v3/libs/iostreams/src/file_descriptor.cpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -31,6 +31,9 @@
# include <io.h> // low-level file i/o.
# define WINDOWS_LEAN_AND_MEAN
# include <windows.h>
+# ifndef INVALID_SET_FILE_POINTER
+# define INVALID_SET_FILE_POINTER ((DWORD)-1)
+# endif
#else
# include <sys/types.h> // mode_t.
# include <unistd.h> // low-level file i/o.
@@ -159,9 +162,13 @@
#ifdef BOOST_IOSTREAMS_WINDOWS
if (pimpl_->flags_ & impl::has_handle) {
if (pimpl_->flags_ & impl::append) {
- ::SetFilePointer(pimpl_->handle_, 0, NULL, FILE_END);
- if (::GetLastError() != NO_ERROR)
+ DWORD const dwResult =
+ ::SetFilePointer(pimpl_->handle_, 0, NULL, FILE_END);
+ if ( dwResult == INVALID_SET_FILE_POINTER &&
+ ::GetLastError() != NO_ERROR )
+ {
throw detail::bad_seek();
+ }
}
DWORD ignore;
if (!::WriteFile(pimpl_->handle_, s, n, &ignore, NULL))
@@ -192,10 +199,14 @@
way == BOOST_IOS::cur ?
FILE_CURRENT :
FILE_END );
- if (::GetLastError() != NO_ERROR) {
+ if ( dwResultLow == INVALID_SET_FILE_POINTER &&
+ ::GetLastError() != NO_ERROR )
+ {
throw detail::bad_seek();
} else {
- return offset_to_position((lDistanceToMoveHigh << 32) + dwResultLow);
+ return offset_to_position(
+ (stream_offset(lDistanceToMoveHigh) << 32) + dwResultLow
+ );
}
}
#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
Modified: branches/proto/v3/libs/iostreams/test/Jamfile.v2
==============================================================================
--- branches/proto/v3/libs/iostreams/test/Jamfile.v2 (original)
+++ branches/proto/v3/libs/iostreams/test/Jamfile.v2 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -79,6 +79,7 @@
[ test-iostreams seekable_filter_test.cpp ]
[ test-iostreams sequence_test.cpp ]
[ test-iostreams stdio_filter_test.cpp ]
+ [ test-iostreams stream_state_test.cpp ]
[ test-iostreams symmetric_filter_test.cpp ]
[ test-iostreams tee_test.cpp ]
[ test-iostreams wide_stream_test.cpp ]
Modified: branches/proto/v3/libs/iostreams/test/code_converter_test.cpp
==============================================================================
--- branches/proto/v3/libs/iostreams/test/code_converter_test.cpp (original)
+++ branches/proto/v3/libs/iostreams/test/code_converter_test.cpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -22,7 +22,7 @@
#if !defined(__COMO__) || !defined(BOOST_COMO_STRICT)
# if defined(BOOST_IOSTREAMS_NO_LIB) || defined(BOOST_ALL_NO_LIB)
# include "../src/file_descriptor.cpp"
-# else
+# else
# include <boost/iostreams/device/file_descriptor.hpp>
# endif
#endif
@@ -38,75 +38,75 @@
#include "detail/null_padded_codecvt.hpp"
#include "detail/utf8_codecvt_facet.hpp"
#ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
-# include <codecvt/8859_1>
-# include <codecvt/8859_10>
-# include <codecvt/8859_13>
-# include <codecvt/8859_14>
-# include <codecvt/8859_15>
-# include <codecvt/8859_16>
-# include <codecvt/8859_2>
-# include <codecvt/8859_3>
-# include <codecvt/8859_4>
-# include <codecvt/8859_5>
-# include <codecvt/8859_6>
-# include <codecvt/8859_7>
-# include <codecvt/8859_8>
-# include <codecvt/8859_9>
-# include <codecvt/baltic>
-# include <codecvt/big5>
-# include <codecvt/cp037>
-# include <codecvt/cp1006>
-# include <codecvt/cp1026>
-# include <codecvt/cp1250>
-# include <codecvt/cp1251>
-# include <codecvt/cp1252>
-# include <codecvt/cp1253>
-# include <codecvt/cp1254>
-# include <codecvt/cp1255>
-# include <codecvt/cp1256>
-# include <codecvt/cp1257>
-# include <codecvt/cp1258>
-# include <codecvt/cp424>
-# include <codecvt/cp437>
-# include <codecvt/cp500>
-# include <codecvt/cp737>
-# include <codecvt/cp775>
-# include <codecvt/cp850>
-# include <codecvt/cp852>
-# include <codecvt/cp855>
-# include <codecvt/cp856>
-# include <codecvt/cp857>
-# include <codecvt/cp860>
-# include <codecvt/cp861>
-# include <codecvt/cp862>
-# include <codecvt/cp863>
-# include <codecvt/cp864>
-# include <codecvt/cp865>
-# include <codecvt/cp866>
-# include <codecvt/cp869>
-# include <codecvt/cp874>
-# include <codecvt/cp875>
-# include <codecvt/cp932>
-# include <codecvt/cp936>
-# include <codecvt/cp949>
-# include <codecvt/cp950>
-# include <codecvt/cyrillic>
-# include <codecvt/ebcdic>
-# include <codecvt/euc>
-# include <codecvt/euc_0208>
-# include <codecvt/gb12345>
-# include <codecvt/gb2312>
-# include <codecvt/greek>
-# include <codecvt/iceland>
-# include <codecvt/jis>
-# include <codecvt/jis_0208>
-# include <codecvt/jis0201>
-# include <codecvt/ksc5601>
-# include <codecvt/latin2>
-# include <codecvt/one_one>
-# include <codecvt/roman>
-# include <codecvt/sjis>
-# include <codecvt/sjis_0208>
+# include <codecvt/8859_1>
+# include <codecvt/8859_10>
+# include <codecvt/8859_13>
+# include <codecvt/8859_14>
+# include <codecvt/8859_15>
+# include <codecvt/8859_16>
+# include <codecvt/8859_2>
+# include <codecvt/8859_3>
+# include <codecvt/8859_4>
+# include <codecvt/8859_5>
+# include <codecvt/8859_6>
+# include <codecvt/8859_7>
+# include <codecvt/8859_8>
+# include <codecvt/8859_9>
+# include <codecvt/baltic>
+# include <codecvt/big5>
+# include <codecvt/cp037>
+# include <codecvt/cp1006>
+# include <codecvt/cp1026>
+# include <codecvt/cp1250>
+# include <codecvt/cp1251>
+# include <codecvt/cp1252>
+# include <codecvt/cp1253>
+# include <codecvt/cp1254>
+# include <codecvt/cp1255>
+# include <codecvt/cp1256>
+# include <codecvt/cp1257>
+# include <codecvt/cp1258>
+# include <codecvt/cp424>
+# include <codecvt/cp437>
+# include <codecvt/cp500>
+# include <codecvt/cp737>
+# include <codecvt/cp775>
+# include <codecvt/cp850>
+# include <codecvt/cp852>
+# include <codecvt/cp855>
+# include <codecvt/cp856>
+# include <codecvt/cp857>
+# include <codecvt/cp860>
+# include <codecvt/cp861>
+# include <codecvt/cp862>
+# include <codecvt/cp863>
+# include <codecvt/cp864>
+# include <codecvt/cp865>
+# include <codecvt/cp866>
+# include <codecvt/cp869>
+# include <codecvt/cp874>
+# include <codecvt/cp875>
+# include <codecvt/cp932>
+# include <codecvt/cp936>
+# include <codecvt/cp949>
+# include <codecvt/cp950>
+# include <codecvt/cyrillic>
+# include <codecvt/ebcdic>
+# include <codecvt/euc>
+# include <codecvt/euc_0208>
+# include <codecvt/gb12345>
+# include <codecvt/gb2312>
+# include <codecvt/greek>
+# include <codecvt/iceland>
+# include <codecvt/jis>
+# include <codecvt/jis_0208>
+# include <codecvt/jis0201>
+# include <codecvt/ksc5601>
+# include <codecvt/latin2>
+# include <codecvt/one_one>
+# include <codecvt/roman>
+# include <codecvt/sjis>
+# include <codecvt/sjis_0208>
# include <codecvt/turkish>
# include <codecvt/utf16>
# include <codecvt/utf8>
@@ -120,7 +120,7 @@
using namespace boost::iostreams;
using namespace boost::iostreams::detail;
using namespace boost::iostreams::test;
-using boost::unit_test::test_suite;
+using boost::unit_test::test_suite;
namespace io = boost::iostreams;
const int max_length = 30;
@@ -146,9 +146,9 @@
template<typename Codecvt>
basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
->
+>
test_string()
{
typedef typename codecvt_intern<Codecvt>::type intern_type;
@@ -157,7 +157,7 @@
if (valid_char<Codecvt>(c))
pattern += c;
result.reserve(pattern.size() * pattern_reps);
- for (int w = 0; w < pattern_reps; ++w)
+ for (unsigned int w = 0; w < pattern_reps; ++w)
result += pattern;
return result;
}
@@ -169,7 +169,7 @@
typedef io::file_descriptor_sink classic_file_sink;
#else
struct classic_file_source : io::source {
- classic_file_source(const std::string& path)
+ classic_file_source(const std::string& path)
: file_(new filebuf)
{
file_->pubimbue(locale::classic());
@@ -180,7 +180,7 @@
};
struct classic_file_sink : io::sink {
- classic_file_sink(const std::string& path)
+ classic_file_sink(const std::string& path)
: file_(new filebuf)
{
file_->pubimbue(locale::classic());
@@ -195,7 +195,7 @@
bool codecvt_test1()
{
typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
> string_type;
typedef code_converter<classic_file_source, Codecvt> wide_file_source;
@@ -219,7 +219,7 @@
bool codecvt_test2()
{
typedef basic_string<
- BOOST_DEDUCED_TYPENAME
+ BOOST_DEDUCED_TYPENAME
codecvt_intern<Codecvt>::type
> string_type;
typedef code_converter<classic_file_source> wide_file_source;
@@ -244,8 +244,8 @@
template<typename Codecvt>
bool codecvt_test()
-{
- return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
+{
+ return codecvt_test1<Codecvt>() && codecvt_test2<Codecvt>();
}
void code_converter_test()
@@ -255,75 +255,75 @@
BOOST_CHECK(codecvt_test<stateless_null_padded_codecvt>());
#ifdef BOOST_IOSTREAMS_USE_DINKUM_COREX
using namespace Dinkum::conversions;
- BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
- BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_1<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_10<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_13<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_14<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_15<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_16<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_3<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_4<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_6<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_7<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_8<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_8859_9<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_baltic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_big5<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp037<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1006<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1026<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1250<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1251<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1252<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1253<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1254<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1255<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1256<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1257<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp1258<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp424<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp437<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp500<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp737<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp775<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp850<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp852<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp855<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp856<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp857<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp860<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp861<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp862<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp863<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp864<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp865<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp866<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp869<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp874<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp875<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp932<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp936<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp949<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cp950<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_cyrillic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ebcdic<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_euc_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb12345<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_gb2312<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_greek<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_iceland<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis_0208<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_jis0201<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_ksc5601<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_latin2<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_one_one<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_roman<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis<wchar_t> >());
+ BOOST_CHECK(codecvt_test< codecvt_sjis_0208<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_turkish<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_utf16<wchar_t> >());
BOOST_CHECK(codecvt_test< codecvt_utf8<wchar_t> >());
@@ -377,10 +377,10 @@
}
}*/
-test_suite* init_unit_test_suite(int, char* [])
+test_suite* init_unit_test_suite(int, char* [])
{
test_suite* test = BOOST_TEST_SUITE("code_converter test");
test->add(BOOST_TEST_CASE(&code_converter_test));
//test->add(BOOST_TEST_CASE(&close_test));
return test;
-}
\ No newline at end of file
+}
Modified: branches/proto/v3/libs/serialization/test/test_complex.cpp
==============================================================================
--- branches/proto/v3/libs/serialization/test/test_complex.cpp (original)
+++ branches/proto/v3/libs/serialization/test/test_complex.cpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -30,8 +30,12 @@
BOOST_REQUIRE(NULL != testfile);
// test array of objects
- std::complex<float> a(std::rand(),std::rand());
- std::complex<double> b(std::rand(),std::rand());
+ std::complex<float> a(static_cast<float>(std::rand()),
+ static_cast<float>(std::rand()));
+
+ std::complex<double> b(static_cast<double>(std::rand()),
+ static_cast<double>(std::rand()));
+
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
test_oarchive oa(os);
Modified: branches/proto/v3/libs/utility/value_init_test.cpp
==============================================================================
--- branches/proto/v3/libs/utility/value_init_test.cpp (original)
+++ branches/proto/v3/libs/utility/value_init_test.cpp 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -202,6 +202,13 @@
x_c_ref = z ;
BOOST_CHECK ( x_c == z ) ;
+ boost::value_initialized<T> const copy1 = x;
+ BOOST_CHECK ( boost::get(copy1) == boost::get(x) ) ;
+
+ boost::value_initialized<T> copy2;
+ copy2 = x;
+ BOOST_CHECK ( boost::get(copy2) == boost::get(x) ) ;
+
boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
BOOST_CHECK ( y == *ptr ) ;
Modified: branches/proto/v3/tools/build/v2/test/timedata.py
==============================================================================
--- branches/proto/v3/tools/build/v2/test/timedata.py (original)
+++ branches/proto/v3/tools/build/v2/test/timedata.py 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -22,7 +22,7 @@
echo timed from $(>) >> $(<)
}
-rule record_time ( target source : user : system )
+rule record_time ( target : source : start end user system )
{
ECHO record_time called: $(target) / $(source) / $(user) / $(system) ;
__USER_TIME__ on $(target) = $(user) ;
Modified: branches/proto/v3/tools/build/v2/tools/testing.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/testing.jam (original)
+++ branches/proto/v3/tools/build/v2/tools/testing.jam 2007-12-24 23:38:53 EST (Mon, 24 Dec 2007)
@@ -509,7 +509,7 @@
type.register TIME : time ;
generators.register-standard testing.time : : TIME ;
-rule record-time ( target source : user : system )
+rule record-time ( target : source : start end user system )
{
local src-string = [$(source:G=:J=",")"] " ;
USER_TIME on $(target) += $(src-string)$(user) ;
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