StrongTypedef.h File Reference

Contains macros used to create "strong typedefs", that is value types that are not mutually interoperable with each other or with builtin types for extra type safety. More...

#include <boost/static_assert.hpp>
#include <boost/operators.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/serialization/nvp.hpp>
#include <iostream>

Go to the source code of this file.

Defines

#define GG_STRONG_INTEGRAL_TYPEDEF(name, type)
#define GG_STRONG_SIZE_TYPEDEF(name)


Detailed Description

Contains macros used to create "strong typedefs", that is value types that are not mutually interoperable with each other or with builtin types for extra type safety.

Definition in file StrongTypedef.h.


Define Documentation

#define GG_STRONG_INTEGRAL_TYPEDEF ( name,
type   ) 

Creates a new type name, based on underlying type type, which is not interconvertible with any other numeric type. type must be an integral type. The resulting type has most of the operations of the underlying integral type. Specifically, the type is totally ordered, incrementable, decrementable, and arithmetic. The type is also interarithemtic with and comparable to objects of types type and double. Note that the free functions accepting doubles return GG_STRONG_DOUBLE_TYPEDEF's called name_d. This allows name objects to be used in floating point math.

Definition at line 168 of file StrongTypedef.h.

#define GG_STRONG_SIZE_TYPEDEF ( name   ) 

Creates a new type name, based on underlying type std::size_t, which is not interconvertible with any other numeric type. The resulting type has most of the operations of std::size_t. Specifically, the type is totally ordered, incrementable, decrementable, and arithmetic. The type is also interarithemtic with and comparable to objects of type std::size_t.

Definition at line 400 of file StrongTypedef.h.


Generated on Sat Mar 26 07:08:37 2011 for GG by  doxygen 1.5.9