Guest
|
Posted: Sun Aug 27, 2006 9:11 am Post subject: I want to modify STL to suite my requirement |
|
|
I want to modify STL to suite my requirement, So I download sgi STL ,
Now I am reading one file of them "concept_checks.h", I don't how it
can check the concept and report error when compile,
such as follow semantics,I need some anotate.
#define __STL_REQUIRES(__type_var, __concept) \
do { \
void (*__x)( __type_var ) = __concept##_concept_specification<
__type_var >\
::__concept##_requirement_violation; __x = __x; } while (0)
#define __STL_GENERATOR_CHECK(__func, __ret) \
do { \
__ret (*__x)( __func&) = \
_STL_GENERATOR_ERROR< \
__func, __ret>::__generator_requirement_violation; \
__x = __x; } while (0)
#define __STL_CLASS_REQUIRES(__type_var, __concept) \
typedef void (* __func##__type_var##__concept)( __type_var ); \
template <__func##__type_var##__concept _Tp1> \
struct __dummy_struct_##__type_var##__concept { }; \
static __dummy_struct_##__type_var##__concept< \
__concept##_concept_specification< \
__type_var>::__concept##_requirement_violation> \
__dummy_ptr_##__type_var##__concept
I need some help to anotate these sentence, complete file is follow ,it
can be referenced. |
|