|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58059 - in trunk: boost/uuid libs/uuid/test
From: marshall_at_[hidden]
Date: 2009-11-30 10:01:11
Author: marshall
Date: 2009-11-30 10:01:10 EST (Mon, 30 Nov 2009)
New Revision: 58059
URL: http://svn.boost.org/trac/boost/changeset/58059
Log:
Compile fixes for uuid
Text files modified:
trunk/boost/uuid/uuid_generators.hpp | 4 ++--
trunk/libs/uuid/test/test_generators.cpp | 12 ++++++------
trunk/libs/uuid/test/test_uuid.cpp | 26 +++++++++++++-------------
3 files changed, 21 insertions(+), 21 deletions(-)
Modified: trunk/boost/uuid/uuid_generators.hpp
==============================================================================
--- trunk/boost/uuid/uuid_generators.hpp (original)
+++ trunk/boost/uuid/uuid_generators.hpp 2009-11-30 10:01:10 EST (Mon, 30 Nov 2009)
@@ -79,7 +79,7 @@
template <typename CharIterator>
uuid operator()(CharIterator begin, CharIterator end) const
{
- typedef typename std::iterator_traits<typename CharIterator>::value_type char_type;
+ typedef typename std::iterator_traits<CharIterator>::value_type char_type;
// check open brace
char_type c = get_next_char(begin, end);
@@ -268,7 +268,7 @@
class basic_random_generator {
private:
typedef uniform_int<unsigned long> distribution_type;
- typedef variate_generator<typename UniformRandomNumberGenerator*, distribution_type> generator_type;
+ typedef variate_generator<UniformRandomNumberGenerator*, distribution_type> generator_type;
struct null_deleter
{
Modified: trunk/libs/uuid/test/test_generators.cpp
==============================================================================
--- trunk/libs/uuid/test/test_generators.cpp (original)
+++ trunk/libs/uuid/test/test_generators.cpp 2009-11-30 10:01:10 EST (Mon, 30 Nov 2009)
@@ -40,7 +40,7 @@
{ // test nil generator
uuid u1 = nil_generator()();
- uuid u2 = {0};
+ uuid u2 = {{0}};
BOOST_CHECK_EQUAL(u1, u2);
uuid u3 = nil_uuid();
@@ -53,8 +53,8 @@
BOOST_CHECK_EQUAL(u, nil_uuid());
BOOST_CHECK_EQUAL(u.is_nil(), true);
- const uuid u_increasing = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
- const uuid u_decreasing = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 };
+ const uuid u_increasing = {{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }};
+ const uuid u_decreasing = {{ 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }};
u = gen("0123456789abcdef0123456789ABCDEF");
BOOST_CHECK_EQUAL(u, u_increasing);
@@ -81,9 +81,9 @@
}
{ // test name_generator
- uuid dns_namespace_uuid = {0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8};
- uuid correct = {0x21, 0xf7, 0xf8, 0xde, 0x80, 0x51, 0x5b, 0x89, 0x86, 0x80, 0x01, 0x95, 0xef, 0x79, 0x8b, 0x6a};
- uuid wcorrect = {0x5b, 0xec, 0xf2, 0x07, 0x1c, 0xd2, 0x59, 0x66, 0x8b, 0x44, 0xf5, 0x7f, 0x23, 0x0a, 0x68, 0xb9};
+ uuid dns_namespace_uuid = {{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}};
+ uuid correct = {{0x21, 0xf7, 0xf8, 0xde, 0x80, 0x51, 0x5b, 0x89, 0x86, 0x80, 0x01, 0x95, 0xef, 0x79, 0x8b, 0x6a}};
+ uuid wcorrect = {{0x5b, 0xec, 0xf2, 0x07, 0x1c, 0xd2, 0x59, 0x66, 0x8b, 0x44, 0xf5, 0x7f, 0x23, 0x0a, 0x68, 0xb9}};
name_generator gen(dns_namespace_uuid);
Modified: trunk/libs/uuid/test/test_uuid.cpp
==============================================================================
--- trunk/libs/uuid/test/test_uuid.cpp (original)
+++ trunk/libs/uuid/test/test_uuid.cpp 2009-11-30 10:01:10 EST (Mon, 30 Nov 2009)
@@ -27,19 +27,19 @@
BOOST_CHECK_EQUAL(uuid::static_size, 16U);
{ // uuid::operator=()
- uuid u1 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ uuid u1 = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}};
uuid u2 = u1;
BOOST_CHECK_EQUAL(u2, u1);
}
{ // uuid::begin(), end()
- uuid u = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ uuid u = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}};
unsigned char values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
BOOST_CHECK_EQUAL_COLLECTIONS(u.begin(), u.end(), values, values+16);
}
{ // uuid::begin() const, end() const
- const uuid u = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ const uuid u = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}};
unsigned char values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
BOOST_CHECK_EQUAL_COLLECTIONS(u.begin(), u.end(), values, values+16);
}
@@ -50,10 +50,10 @@
}
{ // uuid::is_nil()
- uuid u1 = {0};
+ uuid u1 = {{0}};
BOOST_CHECK_EQUAL(u1.is_nil(), true);
- uuid u2 = {1,0};
+ uuid u2 = {{1,0}};
BOOST_CHECK_EQUAL(u2.is_nil(), false);
}
@@ -120,8 +120,8 @@
}
{ // uuid::swap(), swap()
- uuid u1 = {0};
- uuid u2 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ uuid u1 = {{0}};
+ uuid u2 = {{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}};
u1.swap(u2);
unsigned char values1[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
@@ -135,9 +135,9 @@
}
{ // test comparsion
- uuid u1 = {0};
- uuid u2 = {1,0};
- uuid u3 = {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
+ uuid u1 = {{0}};
+ uuid u2 = {{1,0}};
+ uuid u3 = {{255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}};
BOOST_CHECK_EQUAL(u1, u1);
@@ -159,9 +159,9 @@
}
{ // test hash
- uuid u1 = {0};
- uuid u2 = {1,0};
- uuid u3 = {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
+ uuid u1 = {{0}};
+ uuid u2 = {{1,0}};
+ uuid u3 = {{255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}};
boost::hash<uuid> uuid_hasher;
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