source: NonGTP/Boost/boost/mpl/aux_/ptr_to_ref.hpp @ 857

Revision 857, 1.2 KB checked in by igarcia, 19 years ago (diff)
Line 
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// $Source: /cvsroot/boost/boost/boost/mpl/aux_/ptr_to_ref.hpp,v $
14// $Date: 2005/06/22 15:20:18 $
15// $Revision: 1.5 $
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
40namespace boost { namespace mpl { namespace aux {
41
42template< typename T > static T const& ptr_to_ref(T*);
43
44}}}
45
46#endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.