2006-08-30 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Fix missing typedefs and handle types without category.
* stc/any.hh (any__best_speed): Add typedef exact_type.
(any__best_memory): Likewise.
* stc/vtypes.hh (stc_equip_namespace_with_vtypes): Add 'vtypes_'
and the specialization 'vtypes<void, from_type>' for definitions
of associated types from types that do not have any category.
Index: stc/any.hh
===================================================================
--- stc/any.hh (revision 506)
+++ stc/any.hh (working copy)
@@ -107,6 +107,8 @@
template <typename E>
struct any__best_speed : public any<E, dispatch_policy::best_speed>
{
+ typedef E exact_type;
+
protected:
typedef any<E, dispatch_policy::best_speed> super;
any__best_speed(E* exact_ptr = 0) : super(exact_ptr) {}
@@ -165,6 +167,8 @@
template <typename E>
struct any__best_memory : public any<E, dispatch_policy::best_memory>
{
+ typedef E exact_type;
+
protected:
typedef any<E, dispatch_policy::best_memory> super;
any__best_memory() : super() {}
Index: stc/vtypes.hh
===================================================================
--- stc/vtypes.hh (revision 506)
+++ stc/vtypes.hh (working copy)
@@ -231,6 +231,21 @@
{ \
}; \
\
+ /** \brief Internal virtual types associated to \a from_type */ \
+ /** having no category. */ \
+ /** */ \
+ /** Specialize this class for the desired \a from_type. */ \
+ template <typename from_type> \
+ struct vtypes_ \
+ { \
+ }; \
+ \
+ /** Specialization of vtypes for types without category. */ \
+ template <typename from_type> \
+ struct vtypes<void, from_type> : public vtypes_<from_type> \
+ { \
+ }; \
+ \
/** End of the recursive construction of any vtypes hierarchy. */ \
template <typename category> \
struct vtypes<category, mlc::none> \