]> git.cworth.org Git - vogl/blob - src/extlib/loki/include/loki/EmptyType.h
Initial vogl checkin
[vogl] / src / extlib / loki / include / loki / EmptyType.h
1 ////////////////////////////////////////////////////////////////////////////////
2 // The Loki Library
3 // Copyright (c) 2001 by Andrei Alexandrescu
4 // This code accompanies the book:
5 // Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
6 //     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
7 // Permission to use, copy, modify, distribute and sell this software for any
8 //     purpose is hereby granted without fee, provided that the above copyright
9 //     notice appear in all copies and that both that copyright notice and this
10 //     permission notice appear in supporting documentation.
11 // The author or Addison-Wesley Longman make no representations about the
12 //     suitability of this software for any purpose. It is provided "as is"
13 //     without express or implied warranty.
14 ////////////////////////////////////////////////////////////////////////////////
15 #ifndef LOKI_EMPTYTYPE_INC_
16 #define LOKI_EMPTYTYPE_INC_
17
18 // $Id: EmptyType.h 751 2006-10-17 19:50:37Z syntheticpp $
19
20
21 namespace Loki
22 {
23 ////////////////////////////////////////////////////////////////////////////////
24 // class EmptyType
25 // Used as a class type that doesn't hold anything
26 // Useful as a strawman class
27 ////////////////////////////////////////////////////////////////////////////////
28
29 class EmptyType {};
30
31
32 inline bool operator==(const EmptyType &, const EmptyType &)
33 {
34         return true;
35 }
36
37 inline bool operator<(const EmptyType &, const EmptyType &)
38 {
39         return false;
40 }
41
42 inline bool operator>(const EmptyType &, const EmptyType &)
43 {
44         return false;
45 }
46 }
47
48 #endif // end file guardian
49