plll  1.0
plll::helper Namespace Reference

Contains some helper templates and classes. More...

Classes

class  ArgumentParser
 Parses command line arguments and makes them accessible. More...
 
struct  BoolToType
 Conversion from compile-time known bools to types. More...
 
class  CompareTypes
 A type comparison template. More...
 
class  EnableIf
 Allows to remove functions from overload resolution. More...
 
struct  IntToType
 Conversion from compile-time known ints to types. More...
 
struct  remove_decorations
 Strips decorations const, &, volatile and && from types. More...
 
class  SelectFirstType
 A type selector template. More...
 

Functions

template<typename T >
T & make_type_lvalue () PLLL_INTERNAL_NOTHROW_POSTFIX_ENFORCE
 This is a pseudo-template which should only be used in expressions which are never evaluated, such as sizeof() and noexcept() (in C++11). More...
 

Detailed Description

Contains some helper templates and classes.

The plll::helper namespace contains helper templates used throughout the plll library. Examples are a static assertion macro (PLLL_INTERNAL_STATIC_CHECK), a type selector (plll::helper::SelectFirstType<>), int/bool to type converters (plll::helper::IntToType<> and plll::helper::BoolToType<>) and a decoration remover (plll::helper::remove_decorations<>).

Another important member is the plll::helper::ArgumentParser class which allows to parse command line arguments.

Function Documentation

template<typename T >
T& plll::helper::make_type_lvalue ( )

This is a pseudo-template which should only be used in expressions which are never evaluated, such as sizeof() and noexcept() (in C++11).

There exists no implementation (and it would be hard to actually create one) without wasting ressources. Note that this function is guaranteed to not throw an exception by using throw() in C++98/03 and noexcept in C++11 and later.