COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/new_graph_test.cc @ 959:c80ef5912903

Last change on this file since 959:c80ef5912903 was 959:c80ef5912903, checked in by Mihaly Barasz, 19 years ago

skeleton(s) -> concept renaming

File size: 1.3 KB
RevLine 
[946]1/* -*- C++ -*-
2 * src/test/new_graph_test.cc - Part of LEMON, a generic C++ optimization library
3 *
4 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5 * (Egervary Combinatorial Optimization Research Group, EGRES).
6 *
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.
10 *
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
13 * purpose.
14 *
15 */
16
[959]17#include <lemon/concept/graph.h>
[946]18// #include <boost/concept_check.hpp>
19
[959]20using namespace lemon::concept;
[946]21
22// Borrowed from boost:
23template <class T> inline void ignore_unused_variable_warning(const T&) { }
24
25int main()
26{
27  //    This is the "right" way to check a concept:
28  // boost::function_requires< BaseGraphItemConcept<BaseGraphItem> >();
29
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...
39}
Note: See TracBrowser for help on using the repository browser.