summaryrefslogtreecommitdiff
path: root/deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp')
-rw-r--r--deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp b/deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp
new file mode 100644
index 0000000000..dc4bf72886
--- /dev/null
+++ b/deps/tao_tuple/28626e99/include/tao/seq/inclusive_scan.hpp
@@ -0,0 +1,32 @@
+// The Art of C++ / Sequences
+// Copyright (c) 2015 Daniel Frey
+
+#ifndef TAOCPP_SEQUENCES_INCLUDE_INCLUSIVE_SCAN_HPP
+#define TAOCPP_SEQUENCES_INCLUDE_INCLUSIVE_SCAN_HPP
+
+#include <utility>
+
+#include "plus.hpp"
+#include "exclusive_scan.hpp"
+#include "integer_sequence.hpp"
+
+namespace tao
+{
+ namespace seq
+ {
+ template< typename T, T... Ns >
+ struct inclusive_scan
+ : plus< exclusive_scan_t< T, Ns... >, integer_sequence< T, Ns... > >
+ {};
+
+ template< typename T, T... Ns >
+ struct inclusive_scan< integer_sequence< T, Ns... > >
+ : plus< exclusive_scan_t< integer_sequence< T, Ns... > >, integer_sequence< T, Ns... > >
+ {};
+
+ template< typename T, T... Ns >
+ using inclusive_scan_t = typename inclusive_scan< T, Ns... >::type;
+ }
+}
+
+#endif // TAOCPP_SEQUENCES_INCLUDE_INCLUSIVE_SCAN_HPP