~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/unwrap.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
// boost mpl/aux_/unwrap.hpp header file
 
3
// See http://www.boost.org for updates, documentation, and revision history.
 
4
//-----------------------------------------------------------------------------
 
5
//
 
6
//  Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
 
7
//  Copyright (c) 2001 David Abrahams
 
8
//
 
9
//  Permission to copy, use, modify, sell and distribute this software
 
10
//  is granted provided this copyright notice appears in all copies.
 
11
//  This software is provided "as is" without express or implied
 
12
//  warranty, and with no claim as to its suitability for any purpose.
 
13
 
 
14
#ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
 
15
#define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
 
16
 
 
17
#include "boost/ref.hpp"
 
18
 
 
19
namespace boost { namespace mpl { namespace aux {
 
20
 
 
21
template< typename F >
 
22
inline
 
23
F& unwrap(F& f, long)
 
24
{
 
25
    return f;
 
26
}
 
27
 
 
28
template< typename F >
 
29
inline
 
30
F&
 
31
unwrap(reference_wrapper<F>& f, int)
 
32
{
 
33
    return f;
 
34
}
 
35
 
 
36
template< typename F >
 
37
inline
 
38
F&
 
39
unwrap(reference_wrapper<F> const& f, int)
 
40
{
 
41
    return f;
 
42
}
 
43
 
 
44
}}} // namespace boost::mpl::aux
 
45
 
 
46
#endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED