PageRenderTime 72ms CodeModel.GetById 64ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/Src/Dependencies/Boost/boost/fusion/support/detail/access.hpp

http://hadesmem.googlecode.com/
C++ Header | 64 lines | 47 code | 11 blank | 6 comment | 0 complexity | b8f080637ee9d65df30fbf2e7b8704bd MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2006 Joel de Guzman
 3
 4    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 5    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6==============================================================================*/
 7#if !defined(FUSION_ACCESS_04182005_0737)
 8#define FUSION_ACCESS_04182005_0737
 9
10#include <boost/type_traits/add_const.hpp>
11#include <boost/type_traits/add_reference.hpp>
12
13namespace boost { namespace fusion { namespace detail
14{
15    template <typename T>
16    struct ref_result
17    {
18        typedef typename add_reference<typename T::type>::type type;
19    };
20
21    template <typename T>
22    struct cref_result
23    {
24        typedef typename 
25            add_reference<
26                typename add_const<typename T::type>::type
27            >::type 
28        type;
29    };
30
31    template <typename T>
32    struct call_param
33    {
34        typedef T const& type;
35    };
36
37    template <typename T>
38    struct call_param<T &>
39    {
40        typedef T& type;
41    };
42
43    template <typename T>
44    struct call_param<T const>
45    {
46        typedef T const& type;
47    };
48
49    template <typename T>
50    struct call_param<T volatile>
51    {
52        typedef T const& type;
53    };
54
55    template <typename T>
56    struct call_param<T const volatile>
57    {
58        typedef T const& type;
59    };
60
61}}}
62
63#endif
64