generate_const.hpp

Go to the documentation of this file.
00001 /*
00002  * 
00003  * Copyright (c) 2002, 2003 Kresimir Fresl, Toon Knapen and Karl Meerbergen
00004  *
00005  * Distributed under the Boost Software License, Version 1.0.
00006  * (See accompanying file LICENSE_1_0.txt or copy at
00007  * http://www.boost.org/LICENSE_1_0.txt)
00008  *
00009  * First author acknowledges the support of the Faculty of Civil 
00010  * Engineering, University of Zagreb, Croatia.
00011  *
00012  */
00013 
00014 #ifndef BOOST_NUMERIC_BINDINGS_TRAITS_DETAIL_GENERATE_CONST_HPP
00015 #define BOOST_NUMERIC_BINDINGS_TRAITS_DETAIL_GENERATE_CONST_HPP
00016 
00017 #include <boost/numeric/bindings/traits/config.hpp> 
00018 
00019 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
00020 
00021 namespace boost { namespace numeric { namespace bindings { namespace traits { namespace detail {
00022  
00024 
00025   template <typename V, typename X>
00026   struct generate_const {
00027      typedef X type; 
00028   };
00029 
00030   template <typename V, typename X>
00031   struct generate_const< const V, X > {
00032      typedef X const type; 
00033   };
00034 
00035   template <typename V, typename X>
00036   struct generate_const< V const, X const > {
00037      typedef X const type; 
00038   };
00039 
00040   template <typename T, int N, typename X>
00041   struct generate_const< const T[N], X > {
00042      typedef X const type; 
00043   };
00044 
00045   template <typename T, int N, typename X>
00046   struct generate_const< const T[N], X const > {
00047      typedef X const type; 
00048   };
00049 
00050 }}}}}
00051 
00052 #endif // BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
00053 
00054 #endif // BOOST_NUMERIC_BINDINGS_TRAITS_DETAIL_GENERATE_CONST_HPP

Generated on Wed Nov 23 19:00:15 2011 for FreeCAD by  doxygen 1.6.1