diff -r ee5959aa4410 -r c280de819a73 src/work/deba/test.cpp --- a/src/work/deba/test.cpp Sun Apr 17 18:57:22 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -#include - -using namespace std; - -#include - -using namespace lemon; -/* -struct _EmptyList { - void write() const {} -}; - -template -struct _AddNode { - typedef _Next Next; - typedef _Item Item; - - const Item item; - const Next& next; - - _AddNode(const Item& _item, const Next& _next) - : item(_item), next(_next) {} - - void write() const { - next.write(); - cout << item << ' '; - } -}; - -template -struct _Writer { - typedef _List List; - - const List list; - - _Writer(const List& _list = List()) : list(_list) {} - - - template _Writer<_AddNode > add(Item item) const { - return _Writer<_AddNode >(_AddNode(item, list)); - } - - void write() const { - list.write(); - cout << endl; - } -}; - - -typedef _Writer<> Writer; - -int main() { - Writer().add(3).add("alpha").add(4.53).write(); -} -*/ - -class A { -public: - typedef int X; - typedef True XD; -}; - -class C { -}; - - -template -class B { -public: - static const bool state = false; -}; - -template -class B<_A, typename enable_if::type> { -public: - static const bool state = true; -}; - - -int main() { - printf("%s\n", B::state ? "true" : "false"); - printf("%s\n", B::state ? "true" : "false"); - return 0; -}