src/test/new_graph_test.cc
author klao
Wed, 27 Oct 2004 22:38:50 +0000
changeset 946 c94ef40a22ce
child 959 c80ef5912903
permissions -rw-r--r--
The graph_factory branch (@ 1321) has been merged to trunk.
     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 
    17 #include <lemon/skeletons/graph.h>
    18 // #include <boost/concept_check.hpp>
    19 
    20 using namespace lemon::skeleton;
    21 
    22 // Borrowed from boost:
    23 template <class T> inline void ignore_unused_variable_warning(const T&) { }
    24 
    25 int 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 }