A sample file.
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();
67 template <typename _A, bool _B = false>
70 static const bool state = false;
73 template <typename _A>
74 class B<_A, typename enable_if<typename _A::XD, void>::type> {
76 static const bool state = true;
81 printf("%s\n", B<A>::state ? "true" : "false");
82 printf("%s\n", B<C>::state ? "true" : "false");