]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | |
2 | #ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED | |
3 | #define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED | |
4 | ||
5 | // Copyright Aleksey Gurtovoy 2003-2004 | |
6 | // | |
7 | // Distributed under the Boost Software License, Version 1.0. | |
8 | // (See accompanying file LICENSE_1_0.txt or copy at | |
9 | // http://www.boost.org/LICENSE_1_0.txt) | |
10 | // | |
11 | // See http://www.boost.org/libs/mpl for documentation. | |
12 | ||
13 | // $Id$ | |
14 | // $Date$ | |
15 | // $Revision$ | |
16 | ||
17 | #include <boost/mpl/aux_/static_cast.hpp> | |
18 | #include <boost/mpl/aux_/config/msvc.hpp> | |
19 | #include <boost/mpl/aux_/config/workaround.hpp> | |
20 | ||
21 | ||
22 | #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ | |
23 | || ( BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ | |
24 | && !(defined(__STD_STRICT_ANSI) \ | |
25 | || defined(__STD_STRICT_ANSI_ERRORS)) ) | |
26 | ||
27 | # define BOOST_MPL_AUX_PTR_TO_REF(X) \ | |
28 | *BOOST_MPL_AUX_STATIC_CAST(X*, 0) \ | |
29 | /**/ | |
30 | ||
31 | #else | |
32 | ||
33 | # define BOOST_MPL_AUX_PTR_TO_REF(X) \ | |
34 | aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(X*, 0)) \ | |
35 | /**/ | |
36 | ||
37 | #endif | |
38 | ||
39 | ||
40 | namespace boost { namespace mpl { namespace aux { | |
41 | ||
42 | template< typename T > static T const& ptr_to_ref(T*); | |
43 | ||
44 | }}} | |
45 | ||
46 | #endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED |