os/ossrv/ossrv_pub/boost_apis/boost/tr1/functional.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
//  (C) Copyright John Maddock 2005.
sl@0
     2
//  Use, modification and distribution are subject to the
sl@0
     3
//  Boost Software License, Version 1.0. (See accompanying file
sl@0
     4
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
     5
sl@0
     6
#ifndef BOOST_TR1_FUNCTIONAL_HPP_INCLUDED
sl@0
     7
#  define BOOST_TR1_FUNCTIONAL_HPP_INCLUDED
sl@0
     8
#  include <boost/tr1/detail/config.hpp>
sl@0
     9
#  include <functional>
sl@0
    10
sl@0
    11
#if defined(BOOST_HAS_TR1_REFERENCE_WRAPPER) \
sl@0
    12
   || defined(BOOST_HAS_TR1_RESULT_OF)\
sl@0
    13
   || defined(BOOST_HAS_TR1_MEM_FN)\
sl@0
    14
   || defined(BOOST_HAS_TR1_BIND)\
sl@0
    15
   || defined(BOOST_HAS_TR1_FUNCTION)\
sl@0
    16
   || defined(BOOST_HAS_TR1_HASH)
sl@0
    17
#  ifdef BOOST_HAS_INCLUDE_NEXT
sl@0
    18
#     include_next BOOST_TR1_HEADER(functional)
sl@0
    19
#  else
sl@0
    20
#     include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(functional))
sl@0
    21
#  endif
sl@0
    22
#endif
sl@0
    23
sl@0
    24
#ifndef BOOST_HAS_TR1_REFERENCE_WRAPPER
sl@0
    25
sl@0
    26
#include <boost/ref.hpp>
sl@0
    27
sl@0
    28
namespace std{ namespace tr1{
sl@0
    29
sl@0
    30
   using ::boost::reference_wrapper;
sl@0
    31
   using ::boost::ref;
sl@0
    32
   using ::boost::cref;
sl@0
    33
sl@0
    34
} }
sl@0
    35
sl@0
    36
#endif  // BOOST_HAS_TR1_REFERENCE_WRAPPER
sl@0
    37
sl@0
    38
#if !defined(BOOST_HAS_TR1_RESULT_OF)\
sl@0
    39
   && !defined(BOOST_NO_SFINAE) && \
sl@0
    40
   !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
sl@0
    41
sl@0
    42
//
sl@0
    43
// we can only actually include result_of.hpp if the compiler
sl@0
    44
// really does support it, otherwise we just get endless errors...
sl@0
    45
//
sl@0
    46
#include <boost/utility/result_of.hpp>
sl@0
    47
sl@0
    48
namespace std{ namespace tr1{
sl@0
    49
sl@0
    50
   using ::boost::result_of;
sl@0
    51
sl@0
    52
} }
sl@0
    53
sl@0
    54
#endif // BOOST_HAS_TR1_RESULT_OF
sl@0
    55
sl@0
    56
#ifndef BOOST_HAS_TR1_MEM_FN
sl@0
    57
// mem_fn:
sl@0
    58
#include <boost/mem_fn.hpp>
sl@0
    59
sl@0
    60
namespace std{ namespace tr1{
sl@0
    61
sl@0
    62
using boost::mem_fn;
sl@0
    63
sl@0
    64
} }
sl@0
    65
sl@0
    66
#endif // BOOST_HAS_TR1_MEM_FN
sl@0
    67
sl@0
    68
sl@0
    69
#ifndef BOOST_HAS_TR1_BIND
sl@0
    70
// Bind:
sl@0
    71
#include <boost/bind.hpp>
sl@0
    72
sl@0
    73
namespace std{ namespace tr1{
sl@0
    74
sl@0
    75
   // These aren't supported in this release but are in mainline cvs:
sl@0
    76
   // using ::boost::is_bind_expression;
sl@0
    77
   // using ::boost::is_placeholder;
sl@0
    78
   using ::boost::bind;
sl@0
    79
   namespace placeholders {
sl@0
    80
#ifndef BOOST_BIND_NO_PLACEHOLDERS
sl@0
    81
      using ::_1;
sl@0
    82
      using ::_2;
sl@0
    83
      using ::_3;
sl@0
    84
      using ::_4;
sl@0
    85
      using ::_5;
sl@0
    86
      using ::_6;
sl@0
    87
      using ::_7;
sl@0
    88
      using ::_8;
sl@0
    89
      using ::_9;
sl@0
    90
#endif
sl@0
    91
   } // placeholders
sl@0
    92
sl@0
    93
} }
sl@0
    94
sl@0
    95
#endif
sl@0
    96
sl@0
    97
#ifndef BOOST_HAS_TR1_FUNCTION
sl@0
    98
// polymorphic function object wrappers:
sl@0
    99
#include <boost/function.hpp>
sl@0
   100
#include <boost/detail/workaround.hpp>
sl@0
   101
sl@0
   102
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x582) \
sl@0
   103
    && !BOOST_WORKAROUND(BOOST_MSVC, < 1310) \
sl@0
   104
    && !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
sl@0
   105
namespace std{ namespace tr1{
sl@0
   106
sl@0
   107
   using ::boost::bad_function_call;
sl@0
   108
   using ::boost::function;
sl@0
   109
   using ::boost::swap;
sl@0
   110
sl@0
   111
}}
sl@0
   112
#endif
sl@0
   113
sl@0
   114
#endif // BOOST_HAS_TR1_FUNCTION
sl@0
   115
sl@0
   116
#ifndef BOOST_HAS_TR1_HASH
sl@0
   117
//
sl@0
   118
// This header can get included by boost/hash.hpp
sl@0
   119
// leading to cyclic dependencies.  As a workaround
sl@0
   120
// we forward declare boost::hash and include
sl@0
   121
// the actual header later.
sl@0
   122
//
sl@0
   123
namespace boost{
sl@0
   124
template <class T> struct hash;
sl@0
   125
}
sl@0
   126
sl@0
   127
namespace std{ namespace tr1{
sl@0
   128
   using ::boost::hash;
sl@0
   129
sl@0
   130
}}
sl@0
   131
sl@0
   132
#include <boost/functional/hash.hpp>
sl@0
   133
sl@0
   134
#endif
sl@0
   135
sl@0
   136
#endif
sl@0
   137