]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2012 Nathan Ridge | |
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 | #ifndef BOOST_FUSION_SUPPORT_AS_CONST_HPP | |
8 | #define BOOST_FUSION_SUPPORT_AS_CONST_HPP | |
9 | ||
10 | #include <boost/config.hpp> | |
11 | #include <boost/fusion/support/config.hpp> | |
12 | ||
13 | namespace boost { namespace fusion { namespace extension | |
14 | { | |
15 | // A customization point that allows certain wrappers around | |
16 | // Fusion sequence elements (e.g. adt_attribute_proxy) to be | |
17 | // unwrapped in contexts where the element only needs to be | |
18 | // read. The library wraps accesses to Fusion elements in | |
19 | // such contexts with calls to this function. Users can | |
20 | // specialize this function for their own wrappers. | |
21 | template <typename T> | |
22 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
23 | inline const T& as_const(const T& obj) BOOST_NOEXCEPT | |
24 | { | |
25 | return obj; | |
26 | } | |
27 | ||
28 | }}} | |
29 | ||
30 | #endif |