Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65520 - sandbox/chrono/boost/type_traits/ext/detail
From: vicente.botet_at_[hidden]
Date: 2010-09-21 14:54:36


Author: viboes
Date: 2010-09-21 14:54:35 EDT (Tue, 21 Sep 2010)
New Revision: 65520
URL: http://svn.boost.org/trac/boost/changeset/65520

Log:
Add specialization for promotions
Text files modified:
   sandbox/chrono/boost/type_traits/ext/detail/common_type.hpp | 8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

Modified: sandbox/chrono/boost/type_traits/ext/detail/common_type.hpp
==============================================================================
--- sandbox/chrono/boost/type_traits/ext/detail/common_type.hpp (original)
+++ sandbox/chrono/boost/type_traits/ext/detail/common_type.hpp 2010-09-21 14:54:35 EDT (Tue, 21 Sep 2010)
@@ -299,6 +299,14 @@
 template< class T > struct common_type_impl< T, void > { typedef void type; };
 template< class T > struct common_type_impl< void, T > { typedef void type; };
 template<> struct common_type_impl< void, void > { typedef void type; };
+template< > struct common_type_impl< char, short> { typedef int type; };
+template< > struct common_type_impl< short, char> { typedef int type; };
+template< > struct common_type_impl< unsigned char, short> { typedef int type; };
+template< > struct common_type_impl< short, unsigned char> { typedef int type; };
+template< > struct common_type_impl< unsigned char, unsigned short> { typedef int type; };
+template< > struct common_type_impl< unsigned short, unsigned char> { typedef int type; };
+template< > struct common_type_impl< char, unsigned short> { typedef int type; };
+template< > struct common_type_impl< unsigned short, char> { typedef int type; };
 
 } // namespace detail_type_traits_common_type
 


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