From 1eeb5cab12d9545829f2c9be60f1ad0f323fb02c Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Wed, 8 Aug 2012 20:44:40 -0700 Subject: [PATCH] Added a failing SFINAE test. --- .../parser/tests/ast2/AST2TemplateTests.java | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 7a3d4cc0270..3d7852140d8 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -5953,7 +5953,39 @@ public class AST2TemplateTests extends AST2BaseTest { // }; // // typedef A type; - public void testSFINAE() throws Exception { + public void testSFINAE_a() throws Exception { + parseAndCheckBindings(); + } + + // template struct enable_if { typedef T type; }; + // template struct enable_if {}; + // + // template struct is_int { static const bool value = false; }; + // template <> struct is_int { static const bool value = true; }; + // + // template struct is_double { static const bool value = false; }; + // template <> struct is_double { static const bool value = true; }; + // + // template + // struct A { + // static int get() { return 0; } + // }; + // + // template + // struct A::value>::type> { + // static int get() { return 1; } + // }; + // + // template + // struct A::value>::type> { + // static int get() { return 2; } + // }; + // + // void test() { + // A::get(); + // A::get(); + // } + public void _testSFINAE_b() throws Exception { parseAndCheckBindings(); } }