Lumiera  0.pre.03
»edit your freedom«
no-instance.hpp
Go to the documentation of this file.
1 /*
2  NO-INSTANCE.hpp - marker for pure metaprogramming types
3 
4  Copyright (C) Lumiera.org
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
42 #ifndef LIB_META_NO_INSTANCE_H
43 #define LIB_META_NO_INSTANCE_H
44 
45 
46 namespace lib {
47 namespace meta{
48 
55  template<class X>
56  struct NoInstance
57  {
58  NoInstance() { static_assert (!sizeof(X)); }
59  NoInstance (NoInstance const&) { static_assert (!sizeof(X)); }
60  };
61 
62 }} // namespace lib::meta
63 #endif
Implementation namespace for support and library code.
An Entity never to be instantiated.
Definition: no-instance.hpp:56