src/test/new_graph_test.cc
author klao
Thu, 04 Nov 2004 20:24:59 +0000
changeset 959 c80ef5912903
parent 946 c94ef40a22ce
permissions -rw-r--r--
skeleton(s) -> concept renaming
     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/concept/graph.h>
    18 // #include <boost/concept_check.hpp>
    19 
    20 using namespace lemon::concept;
    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 }