Marshall Clow | 354d39c | 2014-01-16 16:58:45 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 10 | #ifndef NOTCONSTRUCTIBLE_H |
| 11 | #define NOTCONSTRUCTIBLE_H |
| 12 | |
| 13 | #include <functional> |
| 14 | |
| 15 | class NotConstructible |
| 16 | { |
| 17 | NotConstructible(const NotConstructible&); |
| 18 | NotConstructible& operator=(const NotConstructible&); |
| 19 | public: |
| 20 | }; |
| 21 | |
| 22 | inline |
| 23 | bool |
| 24 | operator==(const NotConstructible&, const NotConstructible&) |
| 25 | {return true;} |
| 26 | |
| 27 | namespace std |
| 28 | { |
| 29 | |
| 30 | template <> |
| 31 | struct hash<NotConstructible> |
| 32 | : public std::unary_function<NotConstructible, std::size_t> |
| 33 | { |
| 34 | std::size_t operator()(const NotConstructible&) const {return 0;} |
| 35 | }; |
| 36 | |
| 37 | } |
| 38 | |
Howard Hinnant | 8f2f7e7 | 2010-08-22 00:15:28 +0000 | [diff] [blame] | 39 | #endif // NOTCONSTRUCTIBLE_H |