
On Fri, 28 Oct 2011, Christoph wrote:
Ok, and how do i do the check?
if i have a template funktion
template <class Ugraph> foo (Ugraph &g) { // boost::graph_traits <Ugraph>::directed_category = boost::undirectedS ?? }
and i only want to have compiled foo without errors if and only if the Ugraph is an undirected graph, how do i inform the compiler?
BOOST_STATIC_ASSERT( boost::is_base_and_derived< typename boost::graph_traits<Ugraph>::directed_category, boost::undirectedS>::value); -- Jeremiah Willcock
best regards christoph
On Fri, 2011-10-28 at 10:43 -0400, Jeremiah Willcock wrote:
On Fri, 28 Oct 2011, Christoph wrote:
Hi,
ist it possible to test at compile time if a graph is directed or undirected? I would like the compiler to give an error message if the graph is directed.
See directed_category in URL:http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/Graph.html for the way to check.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Christoph
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users