/** * * \section COPYRIGHT * * Copyright 2013-2020 Software Radio Systems Limited * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the distribution. * */ #ifndef SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H #define SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H #include #include namespace srslog { namespace detail { /// /// Implementation of the std::index_sequence C++14 library utility. /// template struct index_sequence {}; template struct index_sequence_helper : public index_sequence_helper {}; template struct index_sequence_helper<0U, Next...> { using type = index_sequence; }; template using make_index_sequence = typename index_sequence_helper::type; /// /// Implementation of the std::get C++14 library utility. /// template struct tuple_index; template struct tuple_index> { static constexpr std::size_t value = 0; }; template struct tuple_index> { static constexpr std::size_t value = 1 + tuple_index>::value; }; template constexpr std::size_t get_type_index_in_tuple() { return tuple_index>::value; } } // namespace detail } // namespace srslog #endif // SRSLOG_DETAIL_SUPPORT_TMP_UTILS_H