Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | #ifndef NOTCONSTRUCTIBLE_H |
| 2 | #define NOTCONSTRUCTIBLE_H |
| 3 | |
| 4 | #include <functional> |
| 5 | |
| 6 | class NotConstructible |
| 7 | { |
| 8 | NotConstructible(const NotConstructible&); |
| 9 | NotConstructible& operator=(const NotConstructible&); |
| 10 | public: |
| 11 | }; |
| 12 | |
| 13 | inline |
| 14 | bool |
| 15 | operator==(const NotConstructible&, const NotConstructible&) |
| 16 | {return true;} |
| 17 | |
| 18 | namespace std |
| 19 | { |
| 20 | |
| 21 | template <> |
| 22 | struct hash<NotConstructible> |
| 23 | : public std::unary_function<NotConstructible, std::size_t> |
| 24 | { |
| 25 | std::size_t operator()(const NotConstructible&) const {return 0;} |
| 26 | }; |
| 27 | |
| 28 | } |
| 29 | |
Howard Hinnant | 6046ace | 2010-08-22 00:15:28 +0000 | [diff] [blame] | 30 | #endif // NOTCONSTRUCTIBLE_H |