Lumiera  0.pre.03
»edit your freedom«
no-instance.hpp File Reference

Go to the source code of this file.

Description

Metaprogramming helper to prevent an entity to be ever instantiated at runtime.

For Template Metaprogramming, we often define classes for the sole purpose of forming a distinct type. Such helper types are established during compilation and typically trigger the instantiation of further types from templates, while there is never the intention to emit any actual code from these entities. As a safety measure, such strictly metaprogramming related facilities may be marked to provoke a compilation failure, when the compiler – accidentally – attempts to generate code to incorporate such an entity into the runtime world.

example
The classical example is a marker type used to select one of various implementation flavours of a given facility. In fact this helper was created to mark variations based on the time code format in use.
See also
timecode.hpp

Definition in file no-instance.hpp.

Classes

struct  NoInstance< X >
 An Entity never to be instantiated. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.