From dba0f3ed7af032660a81a975f11634a9bba88ff2 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 9 Jun 2009 03:33:34 +0000 Subject: [PATCH] Attempt to fix jon's problem with POD type support --- boxedcpp/boxed_value.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/boxedcpp/boxed_value.hpp b/boxedcpp/boxed_value.hpp index efc6590..fe9f6f4 100644 --- a/boxedcpp/boxed_value.hpp +++ b/boxedcpp/boxed_value.hpp @@ -153,6 +153,11 @@ struct Boxed_POD_Value const int double_ = int(&typeid(double)); const int float_ = int(&typeid(float)); + const int long_ = int(&typeid(long)); + const int unsigned_long_ = int(&typeid(unsigned long)); + const int int_ = int(&typeid(int)); + const int unsigned_int_ = int(&typeid(unsigned int)); + const int uint8_t_ = int(&typeid(uint8_t)); const int uint16_t_ = int(&typeid(uint16_t)); const int uint32_t_ = int(&typeid(uint32_t)); @@ -174,6 +179,14 @@ struct Boxed_POD_Value i = Cast_Helper()(v); } else if (inp_ == char_) { i = Cast_Helper()(v); + } else if (inp_ == int_) { + i = Cast_Helper()(v); + } else if (inp_ == unsigned_int_) { + i = Cast_Helper()(v); + } else if (inp_ == long_) { + i = Cast_Helper()(v); + } else if (inp_ == unsigned_long_) { + i = Cast_Helper()(v); } else if (inp_ == int8_t_) { i = Cast_Helper()(v); } else if (inp_ == int16_t_) {