utility 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // <utility> -*- C++ -*-
  2. // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 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. *
  23. * Copyright (c) 1994
  24. * Hewlett-Packard Company
  25. *
  26. * Permission to use, copy, modify, distribute and sell this software
  27. * and its documentation for any purpose is hereby granted without fee,
  28. * provided that the above copyright notice appear in all copies and
  29. * that both that copyright notice and this permission notice appear
  30. * in supporting documentation. Hewlett-Packard Company makes no
  31. * representations about the suitability of this software for any
  32. * purpose. It is provided "as is" without express or implied warranty.
  33. *
  34. *
  35. * Copyright (c) 1996,1997
  36. * Silicon Graphics Computer Systems, Inc.
  37. *
  38. * Permission to use, copy, modify, distribute and sell this software
  39. * and its documentation for any purpose is hereby granted without fee,
  40. * provided that the above copyright notice appear in all copies and
  41. * that both that copyright notice and this permission notice appear
  42. * in supporting documentation. Silicon Graphics makes no
  43. * representations about the suitability of this software for any
  44. * purpose. It is provided "as is" without express or implied warranty.
  45. */
  46. /** @file include/utility
  47. * This is a Standard C++ Library header.
  48. */
  49. #ifndef _GLIBCXX_UTILITY
  50. #define _GLIBCXX_UTILITY 1
  51. #pragma GCC system_header
  52. #include <bits/c++config.h>
  53. #include <bits/stl_relops.h>
  54. #include <bits/stl_pair.h>
  55. #ifdef __GXX_EXPERIMENTAL_CXX0X__
  56. # if defined(_GLIBCXX_INCLUDE_AS_TR1)
  57. # error C++0x header cannot be included from TR1 header
  58. # endif
  59. # if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
  60. # include <tr1_impl/utility>
  61. # else
  62. # define _GLIBCXX_INCLUDE_AS_CXX0X
  63. # define _GLIBCXX_BEGIN_NAMESPACE_TR1
  64. # define _GLIBCXX_END_NAMESPACE_TR1
  65. # define _GLIBCXX_TR1
  66. # include <tr1_impl/utility>
  67. # undef _GLIBCXX_TR1
  68. # undef _GLIBCXX_END_NAMESPACE_TR1
  69. # undef _GLIBCXX_BEGIN_NAMESPACE_TR1
  70. # undef _GLIBCXX_INCLUDE_AS_CXX0X
  71. # endif
  72. # include <bits/move.h>
  73. # include <initializer_list>
  74. #endif
  75. /**
  76. * @defgroup utilities Utilities
  77. *
  78. * Components deemed generally useful. Includes pair, tuple,
  79. * forward/move helpers, ratio, function object, metaprogramming and
  80. * type traits, time, date, and memory functions.
  81. */
  82. #endif /* _GLIBCXX_UTILITY */