|  |  | 
Returns the sizeof() of a type. Accepts void (and returns size 0), which is not supported by std::numeric_limits.  
 More...
#include <TypeUtils.h>
| Public Types | |
| typedef std::size_t | value_t | 
| Static Public Member Functions | |
| template<class S , class T > | |
| static T | callback () | 
| Static Protected Member Functions | |
| template<class S > | |
| static size_t | getSize () | 
| template<> | |
| size_t | getSize () | 
Returns the sizeof() of a type. Accepts void (and returns size 0), which is not supported by std::numeric_limits. 
Usage: Type::call<drain::sizeGetter>(t)
sizeof() returns size in bytes, so 1 for char, 2 for short int and so on.
Todo: renaming to byteSizeGetter, and adding bitSizeGetter
| 
 | inlinestatic | 
| S | - type to be analyzed | 
| T | - destination type (practically value_t) | 
 1.9.8
 1.9.8