Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56378 - sandbox/numeric_bindings/boost/numeric/bindings/traits
From: rutger_at_[hidden]
Date: 2009-09-25 03:15:50


Author: rutger
Date: 2009-09-25 03:15:49 EDT (Fri, 25 Sep 2009)
New Revision: 56378
URL: http://svn.boost.org/trac/boost/changeset/56378

Log:
added void_ptr free function to the traits part

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/traits/type_traits.hpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/traits/type_traits.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/traits/type_traits.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/traits/type_traits.hpp 2009-09-25 03:15:49 EDT (Fri, 25 Sep 2009)
@@ -55,6 +55,11 @@
   inline fcomplex_t* complex_ptr( complex_f* c) { return reinterpret_cast< fcomplex_t*>( c ) ; }
   inline dcomplex_t* complex_ptr( complex_d* c) { return reinterpret_cast< dcomplex_t*>( c ) ; }
 
+ template< typename Type >
+ inline void* void_ptr( Type* p) { return static_cast<void*>( p ); }
+ template< typename Type >
+ inline const void* void_ptr( const Type* p) { return static_cast<const void*>( p ); }
+
   inline complex_f complex_ret(const fcomplex_t& ret) { return reinterpret_cast<const complex_f&>( ret ) ; }
   inline complex_d complex_ret(const dcomplex_t& ret) { return reinterpret_cast<const complex_d&>( ret ) ; }
 


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