summaryrefslogtreecommitdiff
path: root/deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp')
-rw-r--r--deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp b/deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp
new file mode 100644
index 0000000000..9f5cf64eda
--- /dev/null
+++ b/deps/tao_tuple/28626e99/include/tao/seq/integer_sequence.hpp
@@ -0,0 +1,43 @@
+// The Art of C++ / Sequences
+// Copyright (c) 2015 Daniel Frey
+
+#ifndef TAOCPP_SEQUENCES_INCLUDE_INTEGER_SEQUENCE_HPP
+#define TAOCPP_SEQUENCES_INCLUDE_INTEGER_SEQUENCE_HPP
+
+#include <cstddef>
+#include <utility>
+
+#include "config.hpp"
+
+namespace tao
+{
+ namespace seq
+ {
+
+#ifdef TAOCPP_USE_STD_INTEGER_SEQUENCE
+
+ using std::integer_sequence;
+ using std::index_sequence;
+
+#else
+
+ template< typename T, T... Ns >
+ struct integer_sequence
+ {
+ using value_type = T;
+
+ static constexpr std::size_t size() noexcept
+ {
+ return sizeof...( Ns );
+ }
+ };
+
+ template< std::size_t... Ns >
+ using index_sequence = integer_sequence< std::size_t, Ns... >;
+
+#endif
+
+ }
+}
+
+#endif // TAOCPP_SEQUENCES_INCLUDE_INTEGER_SEQUENCE_HPP