klao@946: /* -*- C++ -*- klao@946: * src/test/new_graph_test.cc - Part of LEMON, a generic C++ optimization library klao@946: * klao@946: * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport klao@946: * (Egervary Combinatorial Optimization Research Group, EGRES). klao@946: * klao@946: * Permission to use, modify and distribute this software is granted klao@946: * provided that this copyright notice appears in all copies. For klao@946: * precise terms see the accompanying LICENSE file. klao@946: * klao@946: * This software is provided "AS IS" with no warranty of any kind, klao@946: * express or implied, and with no claim as to its suitability for any klao@946: * purpose. klao@946: * klao@946: */ klao@946: klao@946: #include klao@946: // #include klao@946: klao@946: using namespace lemon::skeleton; klao@946: klao@946: // Borrowed from boost: klao@946: template inline void ignore_unused_variable_warning(const T&) { } klao@946: klao@946: int main() klao@946: { klao@946: // This is the "right" way to check a concept: klao@946: // boost::function_requires< BaseGraphItemConcept >(); klao@946: klao@946: // which is equivalent (considering compile-time checks) to klao@946: // BaseGraphItemConcept bgic; klao@946: // bgic.constraints(); klao@946: // but not actually call or intatiates anything... klao@946: // It's doing aproximately this: klao@946: typedef BaseGraphItemConcept CC; klao@946: void (CC::*x)() = &CC::constraints; klao@946: ignore_unused_variable_warning(x); klao@946: // But even more hackish... klao@946: }