emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests fa54ec1 162/316: (isFooLike, A,


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests fa54ec1 162/316: (isFooLike, A, B, main2): New test tweaked from example by Liang Wang
Date: Fri, 27 Jan 2017 20:03:37 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit fa54ec1c5ddcd07781ebc1e43cc2cb22724e0768
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>

    (isFooLike, A, B, main2): New test tweaked from example by Liang Wang
---
 .../cedet/cedet/semantic/tests/testtemplates.cpp   |   37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp 
b/test/manual/cedet/cedet/semantic/tests/testtemplates.cpp
index fde8de5..9d34ab7 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<typename T>
+struct isFooLike {
+  static const bool value = false;
+};
+
+template <>
+struct isFooLike<int> {
+  static const bool value = true;
+};
+
+
+template <typename T, bool isFoo>
+class A {
+public:
+  A();
+  void foo() {};
+};
+
+
+template <typename T>
+class FooFour : public A<T, isPodLike<T>::value> {
+public:
+  bool bar() {}
+};
+
+
+int main2() {
+
+  FooFour<int> ff;
+
+  ff.// -9-
+    ; // #9# ( "bar" "foo" );
+
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]