aboutsummaryrefslogtreecommitdiffstats
path: root/cxx11/c++11-test-variadic_templates-N2555.cpp
diff options
context:
space:
mode:
authorAntony <acron1@gmail.com>2013-10-30 01:30:12 -0700
committerAntony <acron1@gmail.com>2013-10-30 01:30:12 -0700
commitfa9296278020834d660c9fcc05c32c719263fce3 (patch)
tree4e1d9f35a3beeddcf7df974252c59f6641bd0fe3 /cxx11/c++11-test-variadic_templates-N2555.cpp
parent1a2f8fbc64bd2fe47f7644f25fb769ec255c53bd (diff)
parent9eddc27fcd35289f68be45caaa53a47b8041c12a (diff)
Merge pull request #1 from alecthomas/master
Merge changes from upstream
Diffstat (limited to 'cxx11/c++11-test-variadic_templates-N2555.cpp')
-rw-r--r--cxx11/c++11-test-variadic_templates-N2555.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/cxx11/c++11-test-variadic_templates-N2555.cpp b/cxx11/c++11-test-variadic_templates-N2555.cpp
index 79fae84..4518e88 100644
--- a/cxx11/c++11-test-variadic_templates-N2555.cpp
+++ b/cxx11/c++11-test-variadic_templates-N2555.cpp
@@ -1,23 +1,23 @@
-int Accumulate()
-{
- return 0;
-}
-
-template<typename T, typename... Ts>
-int Accumulate(T v, Ts... vs)
-{
- return v + Accumulate(vs...);
-}
-
-template<int... Is>
-int CountElements()
-{
- return sizeof...(Is);
-}
-
-int main()
-{
- int acc = Accumulate(1, 2, 3, 4, -5);
- int count = CountElements<1,2,3,4,5>();
- return ((acc == 5) && (count == 5)) ? 0 : 1;
-}
+int Accumulate()
+{
+ return 0;
+}
+
+template<typename T, typename... Ts>
+int Accumulate(T v, Ts... vs)
+{
+ return v + Accumulate(vs...);
+}
+
+template<int... Is>
+int CountElements()
+{
+ return sizeof...(Is);
+}
+
+int main()
+{
+ int acc = Accumulate(1, 2, 3, 4, -5);
+ int count = CountElements<1,2,3,4,5>();
+ return ((acc == 5) && (count == 5)) ? 0 : 1;
+}