|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53519 - in sandbox/numeric_adaptor: boost/numeric_adaptor libs/numeric_adaptor/test
From: bruno.lalande_at_[hidden]
Date: 2009-05-31 18:46:33
Author: bruno.lalande
Date: 2009-05-31 18:46:32 EDT (Sun, 31 May 2009)
New Revision: 53519
URL: http://svn.boost.org/trac/boost/changeset/53519
Log:
Added unsigned types to the list of possible conversions.
Text files modified:
sandbox/numeric_adaptor/boost/numeric_adaptor/numeric_adaptor.hpp | 4 ++++
sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
Modified: sandbox/numeric_adaptor/boost/numeric_adaptor/numeric_adaptor.hpp
==============================================================================
--- sandbox/numeric_adaptor/boost/numeric_adaptor/numeric_adaptor.hpp (original)
+++ sandbox/numeric_adaptor/boost/numeric_adaptor/numeric_adaptor.hpp 2009-05-31 18:46:32 EDT (Sun, 31 May 2009)
@@ -33,9 +33,13 @@
template <typename Policy>
struct numeric_adaptor :
enable_cast<numeric_adaptor<Policy>, char>,
+ enable_cast<numeric_adaptor<Policy>, unsigned char>,
enable_cast<numeric_adaptor<Policy>, int>,
+ enable_cast<numeric_adaptor<Policy>, unsigned int>,
enable_cast<numeric_adaptor<Policy>, short int>,
+ enable_cast<numeric_adaptor<Policy>, unsigned short int>,
enable_cast<numeric_adaptor<Policy>, long int>,
+ enable_cast<numeric_adaptor<Policy>, unsigned long int>,
enable_cast<numeric_adaptor<Policy>, float>,
enable_cast<numeric_adaptor<Policy>, double>,
enable_cast<numeric_adaptor<Policy>, long double>
Modified: sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp (original)
+++ sandbox/numeric_adaptor/libs/numeric_adaptor/test/test_conversions.cpp 2009-05-31 18:46:32 EDT (Sun, 31 May 2009)
@@ -27,6 +27,9 @@
num n = 1234.5;
BOOST_CHECK_EQUAL(int(n), 1234);
+ BOOST_CHECK_EQUAL((unsigned int)(n), 1234);
+ BOOST_CHECK_EQUAL((unsigned short)(n), 1234);
+ BOOST_CHECK_EQUAL((unsigned long)(n), 1234);
BOOST_CHECK_EQUAL(float(n), 1234.5);
BOOST_CHECK_EQUAL(double(n), 1234.5);
BOOST_CHECK_EQUAL(std::string(n), "1234.5");
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