2 * src/test/new_graph_test.cc - Part of LEMON, a generic C++ optimization library
4 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5 * (Egervary Combinatorial Optimization Research Group, EGRES).
7 * Permission to use, modify and distribute this software is granted
8 * provided that this copyright notice appears in all copies. For
9 * precise terms see the accompanying LICENSE file.
11 * This software is provided "AS IS" with no warranty of any kind,
12 * express or implied, and with no claim as to its suitability for any
17 #include <lemon/concept/graph.h>
18 // #include <boost/concept_check.hpp>
20 using namespace lemon::concept;
22 // Borrowed from boost:
23 template <class T> inline void ignore_unused_variable_warning(const T&) { }
27 // This is the "right" way to check a concept:
28 // boost::function_requires< BaseGraphItemConcept<BaseGraphItem> >();
30 // which is equivalent (considering compile-time checks) to
31 // BaseGraphItemConcept<BaseGraphItem> bgic;
32 // bgic.constraints();
33 // but not actually call or intatiates anything...
34 // It's doing aproximately this:
35 typedef BaseGraphItemConcept<BaseGraphItem> CC;
36 void (CC::*x)() = &CC::constraints;
37 ignore_unused_variable_warning(x);
38 // But even more hackish...