COIN-OR::LEMON - Graph Library

Changeset 1210:f02396423239 in lemon-0.x for src/work/deba/test.cpp


Ignore:
Timestamp:
03/11/05 17:29:03 (19 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1630
Message:

work modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/deba/test.cpp

    r1036 r1210  
    33using namespace std;
    44
     5#include <lemon/utility.h>
    56
     7using namespace std;
     8/*
    69struct _EmptyList {
    710  void write() const {}
     
    5053  Writer().add(3).add("alpha").add(4.53).write();
    5154}
     55*/
     56
     57class A {
     58public:
     59  typedef int X;
     60};
     61
     62class C {
     63};
     64
     65template <typename A>
     66class TRUE {
     67public:
     68  static const bool state = true;
     69};
     70
     71template <typename _A>
     72class B {
     73public:
     74  typedef enable_if<A::X, int> state;
     75};
     76
     77template <typename _A>
     78class B<_A, void> {
     79public:
     80  static const bool state = true;
     81};
     82
     83int main() {
     84  printf("%s\n", B<A>::state(), true ? "true" : "false");
     85  printf("%s\n", B<C>::state(), true ? "true" : "false");
     86  return 0;
     87}
Note: See TracChangeset for help on using the changeset viewer.