- A primitive function type interface for Preflow.
- A compilation bug fixed
5 #include <lemon/utility.h>
13 template <typename _Item, typename _Next>
21 _AddNode(const Item& _item, const Next& _next)
22 : item(_item), next(_next) {}
30 template <typename _List = _EmptyList>
36 _Writer(const List& _list = List()) : list(_list) {}
39 template <typename Item> _Writer<_AddNode<Item, List> > add(Item item) const {
40 return _Writer<_AddNode<Item, List> >(_AddNode<Item, List>(item, list));
50 typedef _Writer<> Writer;
53 Writer().add(3).add("alpha").add(4.53).write();
68 static const bool state = true;
71 template <typename _A>
74 typedef enable_if<A::X, int> state;
77 template <typename _A>
80 static const bool state = true;
84 printf("%s\n", B<A>::state(), true ? "true" : "false");
85 printf("%s\n", B<C>::state(), true ? "true" : "false");