Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:40

0001 /*=============================================================================
0002     Copyright (c) 2006-2007 Tobias Schwinger
0003   
0004     Use modification and distribution are subject to the Boost Software 
0005     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006     http://www.boost.org/LICENSE_1_0.txt).
0007 ==============================================================================*/
0008 
0009 #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED)
0010 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED
0011 
0012 namespace boost { namespace fusion { namespace detail
0013 {
0014     // const reference deduction for function templates that accept T const &
0015     template <typename T> struct cref               { typedef T const& type; };
0016     template <typename T> struct cref<T&>           { typedef T const& type; };
0017     template <typename T> struct cref<T const>      { typedef T const& type; };
0018 
0019     // mutable reference deduction for function templates that accept T &
0020     template <typename T> struct mref               { typedef T      & type; };
0021     template <typename T> struct mref<T&>           { typedef T      & type; };
0022 
0023     // generic reference deduction for function templates that are overloaded
0024     // to accept both T const & and T &
0025     template <typename T> struct gref               { typedef T const& type; };
0026     template <typename T> struct gref<T&>           { typedef T      & type; };
0027     template <typename T> struct gref<T const>      { typedef T const& type; };
0028 
0029     // appropriately qualified target function in const context
0030     template <typename T> struct qf_c          { typedef T const  type; };
0031     template <typename T> struct qf_c<T const> { typedef T const  type; };
0032     template <typename T> struct qf_c<T &>     { typedef T        type; };
0033 
0034     // appropriately qualified target function in non-const context
0035     template <typename T> struct qf            { typedef T        type; };
0036     template <typename T> struct qf<T const>   { typedef T const  type; };
0037     template <typename T> struct qf<T &>       { typedef T        type; };
0038 }}}
0039 
0040 #endif
0041