generate_const.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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