https://svn.lrde.epita.fr/svn/oln/trunk/static
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Remove packed_vtypes.
* stc/vtypes.hh (packed_vtypes_in_category, packed_vtypes):
Remove.
* tests/vtypes.cc
(my::packed_vtypes_in_category<category::my_cat, T>): Remove
(my::A::~A, , my::B::~B, my::C::~C): Remove dtors.
* tests/vtypes-and-exact.cc
(my::packed_vtypes_in_category<category::my_cat, T>): Remove.
(my::A::~A, , my::B::~B, my::C::~C): Remove dtors.
* tests/vtypes-multiple-supers.cc
(my::packed_vtypes_in_category<category::my_cat, T>): Remove.
(my::A::~A, , my::B::~B, my::C::~C): Remove dtors.
stc/vtypes.hh | 26 --------------------------
tests/vtypes-and-exact.cc | 34 ----------------------------------
tests/vtypes-multiple-supers.cc | 30 ------------------------------
tests/vtypes.cc | 34 ----------------------------------
4 files changed, 124 deletions(-)
Index: tests/vtypes-and-exact.cc
--- tests/vtypes-and-exact.cc (revision 530)
+++ tests/vtypes-and-exact.cc (working copy)
@@ -73,22 +73,6 @@
struct my_cat;
}
- /// Packing of virtual types of any class belonging to the category my::cat.
- template <typename T>
- struct packed_vtypes_in_category<category::my_cat, T>
- {
- typedef my_type_of(T, foo) foo_type;
- typedef my_type_of(T, bar) bar_type;
- typedef my_type_of(T, baz) baz_type;
-
- static void ensure()
- {
- mlc::assert_< mlc_is_ok(foo_type) >::check();
- mlc::assert_< mlc_is_ok(bar_type) >::check();
- mlc::assert_< mlc_is_ok(baz_type) >::check();
- }
- };
-
/*----------------------------------------.
| A<Exact> --|> stc::any__simple<Exact>. |
@@ -118,12 +102,6 @@
typedef my_type_of(A, foo) foo_type;
typedef my_type_of(A, bar) bar_type;
typedef my_type_of(A, baz) baz_type;
-
- ~A()
- {
- // packed_vtypes_in_category< category::my, A<Exact> > is not checked
- // here, since A's baz_type virtual type is undefined.
- }
};
@@ -172,12 +150,6 @@
typedef my_type_of(B, baz) baz_type;
typedef my_type_of(B, quux) quux_type;
typedef my_type_of(B, yin) yin_type;
-
- // Check B's vtypes.
- ~B()
- {
- packed_vtypes_in_category< category::my_cat, B<Exact> >::ensure();
- }
};
@@ -205,12 +177,6 @@
typedef my_type_of_(C, foo) foo_type;
typedef my_type_of_(C, quux) quux_type;
typedef my_type_of_(C, zorg) zorg_type;
-
- // Check C's vtypes.
- ~C()
- {
- packed_vtypes_in_category<category::my_cat, C>::ensure();
- }
};
} // end of namespace my
Index: tests/vtypes-multiple-supers.cc
--- tests/vtypes-multiple-supers.cc (revision 530)
+++ tests/vtypes-multiple-supers.cc (working copy)
@@ -81,18 +81,6 @@
struct my_cat;
}
- /// Packing of virtual types of any class belonging to the category my::cat.
- template <typename T>
- struct packed_vtypes_in_category<category::my_cat, T>
- {
- typedef my_type_of(T, foo) foo_type;
-
- static void ensure()
- {
- mlc::assert_< mlc_is_ok(foo_type) >::check();
- }
- };
-
/*----.
| A. |
@@ -114,12 +102,6 @@
// Aliases.
typedef my_type_of_(A, foo) foo_type;
typedef my_type_of_(A, bar) bar_type;
-
- // Check A's vtypes.
- ~A()
- {
- packed_vtypes_in_category<category::my_cat, A>::ensure();
- }
};
@@ -143,12 +125,6 @@
// Aliases.
typedef my_type_of_(B, foo) foo_type;
typedef my_type_of_(B, baz) baz_type;
-
- // Check B's vtypes.
- ~B()
- {
- packed_vtypes_in_category<category::my_cat, B>::ensure();
- }
};
@@ -182,12 +158,6 @@
typedef my_type_of_(C, foo) foo_type;
typedef my_type_of_(C, bar) bar_type;
typedef my_type_of_(C, baz) baz_type;
-
- // Check C's vtypes.
- ~C()
- {
- packed_vtypes_in_category<category::my_cat, C>::ensure();
- }
};
} // end of namespace my
Index: tests/vtypes.cc
--- tests/vtypes.cc (revision 530)
+++ tests/vtypes.cc (working copy)
@@ -71,22 +71,6 @@
struct my_cat;
}
- /// Packing of virtual types of any class belonging to the category my::cat.
- template <typename T>
- struct packed_vtypes_in_category<category::my_cat, T>
- {
- typedef my_type_of(T, foo) foo_type;
- typedef my_type_of(T, bar) bar_type;
- typedef my_type_of(T, baz) baz_type;
-
- static void ensure()
- {
- mlc::assert_< mlc_is_ok(foo_type) >::check();
- mlc::assert_< mlc_is_ok(bar_type) >::check();
- mlc::assert_< mlc_is_ok(baz_type) >::check();
- }
- };
-
/*----.
| A. |
@@ -115,12 +99,6 @@
typedef my_type_of_(A, foo) foo_type;
typedef my_type_of_(A, bar) bar_type;
typedef my_type_of_(A, baz) baz_type;
-
- ~A()
- {
- // packed_vtypes_in_category<category::my, A> is not checked here,
- // since A's baz_type virtual type is undefined.
- }
};
@@ -163,12 +141,6 @@
typedef my_type_of_(B, baz) baz_type;
typedef my_type_of_(B, quux) quux_type;
typedef my_type_of_(B, yin) yin_type;
-
- // Check B's vtype.
- ~B()
- {
- packed_vtypes_in_category<category::my_cat, B>::ensure();
- }
};
@@ -204,12 +176,6 @@
typedef my_type_of_(Z, quux) quux_type;
typedef my_type_of_(Z, yin) yin_type;
typedef my_type_of_(Z, zorg) zorg_type;
-
- // Check C's vtypes.
- ~Z()
- {
- packed_vtypes_in_category<category::my_cat, Z>::ensure();
- }
};
} // end of namespace my
Index: stc/vtypes.hh
--- stc/vtypes.hh (revision 530)
+++ stc/vtypes.hh (working copy)
@@ -367,32 +367,6 @@
/* \} */ \
\
\
- /* -------------------------- */ \
- /* Packing of virtual types. */ \
- /* -------------------------- */ \
- \
- /** Optional packing structure, to be specialized by the user. */ \
- /** See tests/vtypes.cc for an example of use. */ \
- template <typename category, typename from_type> \
- struct packed_vtypes_in_category \
- { \
- }; \
- \
- /** Optional packing structure, to be specialized by the user. */ \
- /** Version for types without category. */ \
- template <typename from_type> \
- struct packed_vtypes \
- { \
- }; \
- \
- /** Specialization of packed_vtypes for types without category. */ \
- template <typename from_type> \
- struct packed_vtypes_in_category<void, from_type> : \
- public packed_vtypes<from_type> \
- { \
- }; \
- \
- \
/* -------------------- */ \
/* Internal machinery. */ \
/* -------------------- */ \