|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Type traits for primitive type detection and swap operations. More...
Go to the source code of this file.
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Macros | |
| #define | DECLARE_PRIMITIVE(T) |
| Macro to declare a type as primitive. | |
| #define | DECLARE_SWAP(T) |
| Macro to declare optimized swap for primitive type. | |
Functions | |
| template<typename T > | |
| bool | Aleph::is_primitive_type () |
| Check if type T is a primitive C++ type. | |
| template<> | |
| bool | Aleph::is_primitive_type< char > () |
| template<> | |
| bool | Aleph::is_primitive_type< unsigned char > () |
| template<> | |
| bool | Aleph::is_primitive_type< short > () |
| template<> | |
| bool | Aleph::is_primitive_type< unsigned short > () |
| template<> | |
| bool | Aleph::is_primitive_type< int > () |
| template<> | |
| bool | Aleph::is_primitive_type< unsigned int > () |
| template<> | |
| bool | Aleph::is_primitive_type< long long > () |
| template<> | |
| bool | Aleph::is_primitive_type< unsigned long long > () |
| template<> | |
| bool | Aleph::is_primitive_type< float > () |
| template<> | |
| bool | Aleph::is_primitive_type< double > () |
| template<> | |
| bool | Aleph::is_primitive_type< long double > () |
| template<class T > | |
| T & | Aleph::swap (T &t1, T &t2) |
| Generic swap using object's swap method. | |
| template<> | |
| char & | swap< char > (char &t1, char &t2) |
Type traits for primitive type detection and swap operations.
This file provides compile-time type traits for detecting primitive C++ types and optimized swap operations for those types.
is_primitive_type<T>(): Returns true for C++ primitivesswap<T>(): Optimized swap for primitive typesDefinition in file ahTypes.H.
| #define DECLARE_PRIMITIVE | ( | T | ) |
| #define DECLARE_SWAP | ( | T | ) |