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