NotConstructible.h 929 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef NOTCONSTRUCTIBLE_H
  9. #define NOTCONSTRUCTIBLE_H
  10. #include <functional>
  11. class NotConstructible
  12. {
  13. NotConstructible(const NotConstructible&);
  14. NotConstructible& operator=(const NotConstructible&);
  15. public:
  16. };
  17. inline
  18. bool
  19. operator==(const NotConstructible&, const NotConstructible&)
  20. {return true;}
  21. namespace std
  22. {
  23. template <>
  24. struct hash<NotConstructible>
  25. {
  26. typedef NotConstructible argument_type;
  27. typedef std::size_t result_type;
  28. std::size_t operator()(const NotConstructible&) const {return 0;}
  29. };
  30. }
  31. #endif // NOTCONSTRUCTIBLE_H