PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/mpl/aux_/ptr_to_ref.hpp

http://hadesmem.googlecode.com/
C++ Header | 46 lines | 19 code | 15 blank | 12 comment | 3 complexity | 96100abb9d9de7e0ed0902dc6c2b068e MD5 | raw file
 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: ptr_to_ref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14// $Date: 2008-10-11 17:19:02 +1100 (Sat, 11 Oct 2008) $
15// $Revision: 49267 $
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