From 1fe5100239e9f9121fc25fe53cd085833b9c762d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 30 Apr 2019 09:43:32 +0200 Subject: [PATCH] fix dynamic map with index in the special case of bool --- Property_map/include/CGAL/Dynamic_property_map.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Property_map/include/CGAL/Dynamic_property_map.h b/Property_map/include/CGAL/Dynamic_property_map.h index 24532c41e55..4934bfe2202 100644 --- a/Property_map/include/CGAL/Dynamic_property_map.h +++ b/Property_map/include/CGAL/Dynamic_property_map.h @@ -27,6 +27,9 @@ #include #include +#include +#include + namespace CGAL { namespace internal { @@ -131,8 +134,12 @@ struct Dynamic_with_index { typedef Key key_type; typedef Value value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; + typedef typename boost::mpl::if_< boost::is_same, + value_type, + value_type&>::type reference; + typedef typename boost::mpl::if_< boost::is_same, + boost::read_write_property_map_tag, + boost::lvalue_property_map_tag>::type category; Dynamic_with_index() : m_values()