]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/numeric/odeint/include/boost/numeric/odeint/algebra/detail/extract_value_type.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / numeric / odeint / include / boost / numeric / odeint / algebra / detail / extract_value_type.hpp
CommitLineData
7c673cae
FG
1/*
2 [auto_generated]
3 boost/numeric/odeint/algebra/detail/extract_value_type.hpp
4
5 [begin_description]
6 Extract true value type from complex types (eg. std::complex)
7 [end_description]
8
9 Copyright 2013 Karsten Ahnert
10 Copyright 2013 Mario Mulansky
11
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
15 */
16
17#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_EXTRACT_VALUE_TYPE_HPP_INCLUDED
18#define BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_EXTRACT_VALUE_TYPE_HPP_INCLUDED
19
20#include <boost/utility.hpp>
21#include <boost/mpl/has_xxx.hpp>
22
23BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
24
25namespace boost {
26namespace numeric {
27namespace odeint {
28namespace detail {
29
30template< typename S , typename Enabler = void >
31struct extract_value_type {};
32
33// as long as value_types are defined we go down the value_type chain
34// e.g. returning S::value_type::value_type::value_type
35
36template< typename S >
37struct extract_value_type<S , typename boost::disable_if< has_value_type<S> >::type >
38{
39 // no value_type defined, return S
40 typedef S type;
41};
42
43template< typename S >
44struct extract_value_type< S , typename boost::enable_if< has_value_type<S> >::type >
45{
46 // go down the value_type
47 typedef typename extract_value_type< typename S::value_type >::type type;
48};
49
50} } } }
51
52#endif