// TR1 functional header -*- C++ -*-
-// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012
-// Free Software Foundation, Inc.
+// Copyright (C) 2004-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
#include <tr1/functional_hash.h>
#include <ext/type_traits.h>
#include <bits/move.h> // for std::__addressof
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <type_traits> // for integral_constant, true_type, false_type
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<int> struct _Placeholder;
template<typename> class _Bind;
template<int _Num>
const int is_placeholder<_Placeholder<_Num> >::value;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<int _Num>
struct is_placeholder<std::_Placeholder<_Num>>
: std::integral_constant<int, _Num>
is_bind_expression<const volatile _Bind_result<_Result,
_Signature> >::value;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Signature>
struct is_bind_expression<std::_Bind<_Signature>>
: true_type { };
: public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
private _Function_base
{
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
/// This class is used to implement the safe_bool idiom.
struct _Hidden_type
{
*
* This function will not throw an %exception.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit operator bool() const
{ return !_M_empty(); }
#else
operator()(_ArgTypes... __args) const
{
if (_M_empty())
- {
-#if __EXCEPTIONS
- throw bad_function_call();
-#else
- __builtin_abort();
-#endif
- }
+ _GLIBCXX_THROW_OR_ABORT(bad_function_call());
return _M_invoker(_M_functor, __args...);
}
_GLIBCXX_END_NAMESPACE_VERSION
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename> struct is_placeholder;