summaryrefslogtreecommitdiff
path: root/boost/spirit/home/support/detail/hold_any.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/spirit/home/support/detail/hold_any.hpp')
-rw-r--r--boost/spirit/home/support/detail/hold_any.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/boost/spirit/home/support/detail/hold_any.hpp b/boost/spirit/home/support/detail/hold_any.hpp
index 9ecde29dc8..5d1bdfa632 100644
--- a/boost/spirit/home/support/detail/hold_any.hpp
+++ b/boost/spirit/home/support/detail/hold_any.hpp
@@ -133,32 +133,32 @@ namespace boost { namespace spirit
static void static_delete(void** x)
{
// destruct and free memory
- delete (*reinterpret_cast<T**>(x));
+ delete static_cast<T*>(*x);
}
static void destruct(void** x)
{
// destruct only, we'll reuse memory
- (*reinterpret_cast<T**>(x))->~T();
+ static_cast<T*>(*x)->~T();
}
static void clone(void* const* src, void** dest)
{
- *dest = new T(**reinterpret_cast<T* const*>(src));
+ *dest = new T(*static_cast<T const*>(*src));
}
static void move(void* const* src, void** dest)
{
- **reinterpret_cast<T**>(dest) =
- **reinterpret_cast<T* const*>(src);
+ *static_cast<T*>(*dest) =
+ *static_cast<T const*>(*src);
}
static std::basic_istream<Char>&
stream_in(std::basic_istream<Char>& i, void** obj)
{
- i >> **reinterpret_cast<T**>(obj);
+ i >> *static_cast<T*>(*obj);
return i;
}
static std::basic_ostream<Char>&
stream_out(std::basic_ostream<Char>& o, void* const* obj)
{
- o << **reinterpret_cast<T* const*>(obj);
+ o << *static_cast<T const*>(*obj);
return o;
}
};