https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add static assertions to oln::topo_bbox_ and oln::topo_lbbox_.
* oln/core/gen/topo_bbox.hh (oln::topo_bbox_<point>)
* oln/core/gen/topo_lbbox.hh (oln::topo_lbbox_<point>): Ensure
parameter point is an oln::abstract::point.
topo_bbox.hh | 4 +++-
topo_lbbox.hh | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
Index: oln/core/gen/topo_bbox.hh
--- oln/core/gen/topo_bbox.hh (revision 620)
+++ oln/core/gen/topo_bbox.hh (working copy)
@@ -60,7 +60,9 @@
/// Bounding box topology based on a point class.
template <typename point>
- class topo_bbox_ : public topology_entry< topo_bbox_<point> >
+ class topo_bbox_ :
+ public topology_entry< topo_bbox_<point> >,
+ private mlc::assert_< mlc_is_a(point, abstract::point) >
{
typedef topo_bbox_<point> self_t;
typedef topology_entry<self_t> super_t;
Index: oln/core/gen/topo_lbbox.hh
--- oln/core/gen/topo_lbbox.hh (revision 620)
+++ oln/core/gen/topo_lbbox.hh (working copy)
@@ -62,7 +62,9 @@
/// Bounding box topology based on a point class.
template <typename point>
- class topo_lbbox_ : public topology_entry< topo_lbbox_<point> >
+ class topo_lbbox_ :
+ public topology_entry< topo_lbbox_<point> >,
+ private mlc::assert_< mlc_is_a(point, abstract::point) >
{
typedef bbox_<point> bbox_t;