functional 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // <functional> -*- C++ -*-
  2. // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
  3. // Free Software Foundation, Inc.
  4. //
  5. // This file is part of the GNU ISO C++ Library. This library is free
  6. // software; you can redistribute it and/or modify it under the
  7. // terms of the GNU General Public License as published by the
  8. // Free Software Foundation; either version 3, or (at your option)
  9. // any later version.
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. // Under Section 7 of GPL version 3, you are granted additional
  15. // permissions described in the GCC Runtime Library Exception, version
  16. // 3.1, as published by the Free Software Foundation.
  17. // You should have received a copy of the GNU General Public License and
  18. // a copy of the GCC Runtime Library Exception along with this program;
  19. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  20. // <http://www.gnu.org/licenses/>.
  21. /*
  22. * Copyright (c) 1997
  23. * Silicon Graphics Computer Systems, Inc.
  24. *
  25. * Permission to use, copy, modify, distribute and sell this software
  26. * and its documentation for any purpose is hereby granted without fee,
  27. * provided that the above copyright notice appear in all copies and
  28. * that both that copyright notice and this permission notice appear
  29. * in supporting documentation. Silicon Graphics makes no
  30. * representations about the suitability of this software for any
  31. * purpose. It is provided "as is" without express or implied warranty.
  32. *
  33. */
  34. /** @file include/functional
  35. * This is a Standard C++ Library header.
  36. */
  37. #ifndef _GLIBCXX_FUNCTIONAL
  38. #define _GLIBCXX_FUNCTIONAL 1
  39. #pragma GCC system_header
  40. #include <bits/c++config.h>
  41. #include <bits/stl_function.h>
  42. #ifdef __GXX_EXPERIMENTAL_CXX0X__
  43. # if defined(_GLIBCXX_INCLUDE_AS_TR1)
  44. # error C++0x header cannot be included from TR1 header
  45. # endif
  46. # include <typeinfo>
  47. # include <new>
  48. # include <tuple>
  49. # include <type_traits>
  50. # include <bits/stringfwd.h>
  51. # include <bits/functional_hash.h>
  52. # include <ext/type_traits.h>
  53. # if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
  54. # include <tr1_impl/functional>
  55. # else
  56. # define _GLIBCXX_INCLUDE_AS_CXX0X
  57. # define _GLIBCXX_BEGIN_NAMESPACE_TR1
  58. # define _GLIBCXX_END_NAMESPACE_TR1
  59. # define _GLIBCXX_TR1
  60. # include <tr1_impl/functional>
  61. # undef _GLIBCXX_TR1
  62. # undef _GLIBCXX_END_NAMESPACE_TR1
  63. # undef _GLIBCXX_BEGIN_NAMESPACE_TR1
  64. # undef _GLIBCXX_INCLUDE_AS_CXX0X
  65. # endif
  66. #endif
  67. #endif // _GLIBCXX_FUNCTIONAL