From: Eric Ludlam Date: Sun, 18 Oct 2015 14:11:33 +0000 (-0400) Subject: (isFooLike, A, B, main2): New test tweaked from example by Liang Wang X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa54ec1c5ddcd07781ebc1e43cc2cb22724e0768;p=emacs.git (isFooLike, A, B, main2): New test tweaked from example by Liang Wang --- diff --git a/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp b/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp index fde8de55cc4..9d34ab704e6 100644 --- a/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp +++ b/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp @@ -88,3 +88,40 @@ main(void) { ; } + +// More Namespace Magic using member constants. + +template +struct isFooLike { + static const bool value = false; +}; + +template <> +struct isFooLike { + static const bool value = true; +}; + + +template +class A { +public: + A(); + void foo() {}; +}; + + +template +class FooFour : public A::value> { +public: + bool bar() {} +}; + + +int main2() { + + FooFour ff; + + ff.// -9- + ; // #9# ( "bar" "foo" ); + +}