mirror of https://github.com/CGAL/cgal
Merge pull request #4208 from sloriot/BGL-avoid_silent_errors
Add code to prevent silent bad usage of boost::get_param
This commit is contained in:
commit
3a1a1685fa
|
|
@ -231,7 +231,14 @@ bool is_default_parameter(const T&)
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
|
||||
|
||||
// code added to avoid silent runtime issues in non-updated code
|
||||
namespace boost
|
||||
{
|
||||
template <typename T, typename Tag, typename Base, typename Tag2, bool B = false>
|
||||
void get_param(CGAL::Named_function_parameters<T,Tag,Base>, Tag2)
|
||||
{
|
||||
CGAL_static_assertion(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param");
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP
|
||||
|
|
|
|||
|
|
@ -15,3 +15,4 @@ ack -l --cpp is_default_param | xargs sed -i -E 's/is_default_param[ ]*\(/is_def
|
|||
ack vertex_index_t | grep get_param
|
||||
|
||||
git checkout BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp
|
||||
git checkout BGL/include/CGAL/boost/graph/Named_function_parameters.h
|
||||
|
|
|
|||
Loading…
Reference in New Issue