synopsis.cc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 <deque>
  19. #if __cplusplus >= 201103L
  20. # define NOTHROW(X) noexcept(X)
  21. #else
  22. # define NOTHROW(X)
  23. #endif
  24. namespace std {
  25. template <class T, class Allocator> class deque;
  26. template <class T, class Allocator>
  27. bool operator== (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  28. template <class T, class Allocator>
  29. bool operator< (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  30. template <class T, class Allocator>
  31. bool operator!= (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  32. template <class T, class Allocator>
  33. bool operator> (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  34. template <class T, class Allocator>
  35. bool operator>= (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  36. template <class T, class Allocator>
  37. bool operator<= (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
  38. template <class T, class Allocator>
  39. void swap(deque<T,Allocator>& x, deque<T,Allocator>& y)
  40. NOTHROW(noexcept(x.swap(y)));
  41. }