2015-07-11 01:38:11 +00:00
|
|
|
/* Some tuple internals for inclusion from various headers. Partially
|
|
|
|
* taken from the libc++ project.
|
|
|
|
*
|
|
|
|
* This file is part of OctaSTD. See COPYING.md for futher information.
|
|
|
|
*/
|
|
|
|
|
2015-07-13 19:08:55 +00:00
|
|
|
#ifndef OSTD_INTERNAL_TUPLE_HH
|
|
|
|
#define OSTD_INTERNAL_TUPLE_HH
|
2015-07-11 01:38:11 +00:00
|
|
|
|
2017-01-28 17:30:31 +00:00
|
|
|
#include <tuple>
|
2017-01-28 17:52:34 +00:00
|
|
|
#include <utility>
|
2017-01-28 17:30:31 +00:00
|
|
|
|
2015-07-13 19:07:14 +00:00
|
|
|
namespace ostd {
|
2015-07-11 01:38:11 +00:00
|
|
|
|
|
|
|
/* is tuple-like */
|
|
|
|
|
2016-07-31 19:40:25 +00:00
|
|
|
template<typename T>
|
|
|
|
constexpr bool IsTupleLike = false;
|
2016-01-20 18:09:44 +00:00
|
|
|
|
2016-07-31 19:40:25 +00:00
|
|
|
template<typename T>
|
|
|
|
constexpr bool IsTupleLike<const T> = IsTupleLike<T>;
|
|
|
|
template<typename T>
|
|
|
|
constexpr bool IsTupleLike<volatile T> = IsTupleLike<T>;
|
|
|
|
template<typename T>
|
|
|
|
constexpr bool IsTupleLike<const volatile T> = IsTupleLike<T>;
|
2015-07-11 01:38:11 +00:00
|
|
|
|
2017-01-28 17:30:31 +00:00
|
|
|
template<typename ...A>
|
|
|
|
constexpr bool IsTupleLike<std::tuple<A...>> = true;
|
|
|
|
|
2016-07-31 19:40:25 +00:00
|
|
|
template<typename T, typename U>
|
2017-01-28 17:52:34 +00:00
|
|
|
constexpr bool IsTupleLike<std::pair<T, U>> = true;
|
2015-07-11 01:38:11 +00:00
|
|
|
|
2015-07-13 19:07:14 +00:00
|
|
|
} /* namespace ostd */
|
2015-07-11 01:38:11 +00:00
|
|
|
|
2016-02-07 21:17:15 +00:00
|
|
|
#endif
|