xref: /minix3/external/bsd/libc++/dist/libcxx/test/containers/NotConstructible.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
2*0a6a1f1dSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc //                     The LLVM Compiler Infrastructure
4*0a6a1f1dSLionel Sambuc //
5*0a6a1f1dSLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open
6*0a6a1f1dSLionel Sambuc // Source Licenses. See LICENSE.TXT for details.
7*0a6a1f1dSLionel Sambuc //
8*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
9*0a6a1f1dSLionel Sambuc 
104684ddb6SLionel Sambuc #ifndef NOTCONSTRUCTIBLE_H
114684ddb6SLionel Sambuc #define NOTCONSTRUCTIBLE_H
124684ddb6SLionel Sambuc 
134684ddb6SLionel Sambuc #include <functional>
144684ddb6SLionel Sambuc 
154684ddb6SLionel Sambuc class NotConstructible
164684ddb6SLionel Sambuc {
174684ddb6SLionel Sambuc     NotConstructible(const NotConstructible&);
184684ddb6SLionel Sambuc     NotConstructible& operator=(const NotConstructible&);
194684ddb6SLionel Sambuc public:
204684ddb6SLionel Sambuc };
214684ddb6SLionel Sambuc 
224684ddb6SLionel Sambuc inline
234684ddb6SLionel Sambuc bool
244684ddb6SLionel Sambuc operator==(const NotConstructible&, const NotConstructible&)
254684ddb6SLionel Sambuc {return true;}
264684ddb6SLionel Sambuc 
274684ddb6SLionel Sambuc namespace std
284684ddb6SLionel Sambuc {
294684ddb6SLionel Sambuc 
304684ddb6SLionel Sambuc template <>
314684ddb6SLionel Sambuc struct hash<NotConstructible>
324684ddb6SLionel Sambuc     : public std::unary_function<NotConstructible, std::size_t>
334684ddb6SLionel Sambuc {
344684ddb6SLionel Sambuc     std::size_t operator()(const NotConstructible&) const {return 0;}
354684ddb6SLionel Sambuc };
364684ddb6SLionel Sambuc 
374684ddb6SLionel Sambuc }
384684ddb6SLionel Sambuc 
394684ddb6SLionel Sambuc #endif  // NOTCONSTRUCTIBLE_H
40