Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libstdc++-v3 / include / tr1 / functional
index ef1461b..fc79fbe 100644 (file)
@@ -1,7 +1,6 @@
 // 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;
@@ -915,7 +914,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   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>
@@ -1431,7 +1430,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     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 { };
@@ -1889,7 +1888,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : 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
       {
@@ -2042,7 +2041,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *
        *  This function will not throw an %exception.
        */
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
       explicit operator bool() const
       { return !_M_empty(); }
 #else
@@ -2143,13 +2142,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     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...);
     }
 
@@ -2258,7 +2251,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 _GLIBCXX_END_NAMESPACE_VERSION
 }
 
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   template<typename> struct is_placeholder;