diff --git a/libs/integer/doc/endian.html b/libs/integer/doc/endian.html index 9dd8f71..de2e49e 100644 --- a/libs/integer/doc/endian.html +++ b/libs/integer/doc/endian.html @@ -281,19 +281,19 @@ usual operations on integers are supplied.
namespace integer { - namespace endianness { enum enum_t { big, little, native }; } // simulate C++0x scoped enum - namespace alignment { enum enum_t { unaligned, aligned }; } // simulate C++0x scoped enum + enum class endianness { big, little, native }; // scoped enum emulated on C++03 + enum class alignment { unaligned, aligned }; // scoped enum emulated on C++03 - template <endianness::enum_t E, typename T, std::size_t n_bits, - alignment::enum_t A = alignment::unaligned> + template <endianness E, typename T, std::size_t n_bits, + alignment A = alignment::unaligned> class endian : integer_cover_operators< endian<E, T, n_bits, A>, T > { public: typedef T value_type; - endian(){} - explicit endian(T v); - endian & operator=(T v); - operator T() const; + endian() = default; // = default replaced by {} on C++03 + explicit endian(T v); + endian & operator=(T v); + operator T() const; }; // unaligned big endian signed integer types @@ -385,29 +385,29 @@ usual operations on integers are supplied. } // namespace integer } // namespace boostendian(){}
endian() = default; // C++03: endian(){}
-Effects: Constructs an object of type
endian<E, T, n_bits, A>
.
explicit endian(T v);
explicit endian(T v);
-Effects: Constructs an object of type
endian<E, T, n_bits, A>
.Postcondition:
x == v,
wherex
is the constructed object.
endian & operator=(T v);
endian & operator=(T v);
-Postcondition:
x == v,
wherex
is the constructed object.Returns:
*this
.
operator T() const;
operator T() const;
Returns: The current value stored in
*this
, converted tovalue_type
.
All other operators on endian objects are forwarded to the equivalent +
Other operators on endian objects are forwarded to the equivalent
operator on value_type
.
Why bother with endian types? External data portability and both speed
diff --git a/libs/integer/test/Jamfile.v2 b/libs/integer/test/Jamfile.v2
index a2f1130..f36b1a3 100644
--- a/libs/integer/test/Jamfile.v2
+++ b/libs/integer/test/Jamfile.v2
@@ -2,15 +2,19 @@
# Copyright Beman Dawes 2006
-# Distributed under the Boost Software License, Version 1.0. (See accompanying
-# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
-# See library home page at http://www.boost.org/libs/endian
+# See library home page at http://www.boost.org/libs/integer/doc/endian.html
import testing ;
test-suite "endian"
- : [ run endian_test.cpp ]
-# [ run endian_operations_test.cpp ]
-# [ run endian_in_union_test.cpp ]
- ;
+ :
+ [ run binary_stream_test.cpp ]
+ [ run endian_binary_stream_test.cpp ]
+ [ run endian_test.cpp ]
+ [ run endian_operations_test.cpp ]
+ [ run endian_in_union_test.cpp ]
+ [ run scoped_enum_emulation_test.cpp ]
+ ;
diff --git a/libs/integer/test/test.bat b/libs/integer/test/test.bat
index d5c72f2..e998ac4 100644
--- a/libs/integer/test/test.bat
+++ b/libs/integer/test/test.bat
@@ -1,8 +1,8 @@
-set ENDIAN_LOCATE_ROOT=%temp%\endian-regr
+set ENDIAN_LOCATE_ROOT=%TEMP%\endian-regr
md %ENDIAN_LOCATE_ROOT% 2>nul
echo Begin test processing...
-bjam --dump-tests "-sALL_LOCATE_TARGET=%ENDIAN_LOCATE_ROOT%" %* >bjam.log 2>&1
+bjam --dump-tests includes=/boost/trunk "-sALL_LOCATE_TARGET=%ENDIAN_LOCATE_ROOT%" %* >bjam.log 2>&1
echo Begin log processing...
process_jam_log %ENDIAN_LOCATE_ROOT%