Hi Volodya,

I do this kind of checking in the BGL algorithms. Look at the
function choose_param in boost/graph/named_function_params.hpp
Warning: the code is pretty ugly :(

Regards,
Jeremy

On Wed, 29 Jan 2003, Vladimir Prus wrote:

ghost>
ghost> Jeremy,
ghost>
ghost> suppose I got lazy and don't want my graph algorithm to be passed a
ghost> graph which does not have internal edge_weight property. What's the
ghost> best way to check? I can do
ghost>
ghost>     get(edge_weight, g);
ghost>
ghost> but that causes compile error in instantination deeps. What I'd like is
ghost> something like:
ghost>
ghost>      BOOST_STATIC_ASSERT(has_property<edge_weight_t, G>::value);
ghost>
ghost> Is it possible now? If not, is this a reasonable feature?
ghost>
ghost> - Volodya
ghost>
ghost> _______________________________________________
ghost> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
ghost>

----------------------------------------------------------------------
 Jeremy Siek                          http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton   email: [EMAIL PROTECTED]
 C++ Booster (http://www.boost.org)   office phone: (812) 855-3608
----------------------------------------------------------------------

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to