synopsis.cc 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // { dg-do compile }
  2. // { dg-require-normal-mode "" }
  3. // { dg-require-normal-namespace "" }
  4. // Copyright (C) 2007-2022 Free Software Foundation, Inc.
  5. //
  6. // This file is part of the GNU ISO C++ Library. This library is free
  7. // software; you can redistribute it and/or modify it under the
  8. // terms of the GNU General Public License as published by the
  9. // Free Software Foundation; either version 3, or (at your option)
  10. // any later version.
  11. // This library is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. // GNU General Public License for more details.
  15. // You should have received a copy of the GNU General Public License along
  16. // with this library; see the file COPYING3. If not see
  17. // <http://www.gnu.org/licenses/>.
  18. #include <set>
  19. #if __cplusplus >= 201103L
  20. # define NOTHROW(X) noexcept(X)
  21. #else
  22. # define NOTHROW(X)
  23. #endif
  24. namespace std {
  25. template <class Key, class Compare, class Allocator>
  26. class set;
  27. template <class Key, class Compare, class Allocator>
  28. bool operator==(const set<Key,Compare,Allocator>& x,
  29. const set<Key,Compare,Allocator>& y);
  30. template <class Key, class Compare, class Allocator>
  31. bool operator< (const set<Key,Compare,Allocator>& x,
  32. const set<Key,Compare,Allocator>& y);
  33. template <class Key, class Compare, class Allocator>
  34. bool operator!=(const set<Key,Compare,Allocator>& x,
  35. const set<Key,Compare,Allocator>& y);
  36. template <class Key, class Compare, class Allocator>
  37. bool operator> (const set<Key,Compare,Allocator>& x,
  38. const set<Key,Compare,Allocator>& y);
  39. template <class Key, class Compare, class Allocator>
  40. bool operator>=(const set<Key,Compare,Allocator>& x,
  41. const set<Key,Compare,Allocator>& y);
  42. template <class Key, class Compare, class Allocator>
  43. bool operator<=(const set<Key,Compare,Allocator>& x,
  44. const set<Key,Compare,Allocator>& y);
  45. template <class Key, class Compare, class Allocator>
  46. void swap(set<Key,Compare,Allocator>& x,
  47. set<Key,Compare,Allocator>& y)
  48. NOTHROW(noexcept(x.swap(y)));
  49. template <class Key, class Compare, class Allocator>
  50. class multiset;
  51. template <class Key, class Compare, class Allocator>
  52. bool operator==(const multiset<Key,Compare,Allocator>& x,
  53. const multiset<Key,Compare,Allocator>& y);
  54. template <class Key, class Compare, class Allocator>
  55. bool operator< (const multiset<Key,Compare,Allocator>& x,
  56. const multiset<Key,Compare,Allocator>& y);
  57. template <class Key, class Compare, class Allocator>
  58. bool operator!=(const multiset<Key,Compare,Allocator>& x,
  59. const multiset<Key,Compare,Allocator>& y);
  60. template <class Key, class Compare, class Allocator>
  61. bool operator> (const multiset<Key,Compare,Allocator>& x,
  62. const multiset<Key,Compare,Allocator>& y);
  63. template <class Key, class Compare, class Allocator>
  64. bool operator>=(const multiset<Key,Compare,Allocator>& x,
  65. const multiset<Key,Compare,Allocator>& y);
  66. template <class Key, class Compare, class Allocator>
  67. bool operator<=(const multiset<Key,Compare,Allocator>& x,
  68. const multiset<Key,Compare,Allocator>& y);
  69. template <class Key, class Compare, class Allocator>
  70. void swap(multiset<Key,Compare,Allocator>& x,
  71. multiset<Key,Compare,Allocator>& y)
  72. NOTHROW(noexcept(x.swap(y)));
  73. }