mirror of https://github.com/PentHertz/srsLTE.git
move choice_type to adt folder
This commit is contained in:
parent
43082e8d6a
commit
b86d2ab7d0
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "type_utils.h"
|
||||
#include "srslte/adt/detail/type_utils.h"
|
||||
|
||||
#ifndef SRSLTE_CHOICE_TYPE_H
|
||||
#define SRSLTE_CHOICE_TYPE_H
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
*
|
||||
* \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 CPP_TESTS_INDEX_SEQUENCE_H
|
||||
#define CPP_TESTS_INDEX_SEQUENCE_H
|
||||
|
||||
namespace srslte {
|
||||
|
||||
template <std::size_t...>
|
||||
struct index_sequence {};
|
||||
|
||||
template <std::size_t N, std::size_t... Next>
|
||||
struct index_sequence_helper : public index_sequence_helper<N - 1U, N - 1U, Next...> {};
|
||||
|
||||
template <std::size_t... Next>
|
||||
struct index_sequence_helper<0U, Next...> {
|
||||
using type = index_sequence<Next...>;
|
||||
};
|
||||
|
||||
template <std::size_t N>
|
||||
using make_index_sequence = typename index_sequence_helper<N>::type;
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // CPP_TESTS_INDEX_SEQUENCE_H
|
|
@ -287,7 +287,8 @@ const T& get(const TypeContainer& c)
|
|||
}
|
||||
|
||||
template <size_t I,
|
||||
template <typename...> class TypeContainer,
|
||||
template <typename...>
|
||||
class TypeContainer,
|
||||
typename... Args,
|
||||
typename T = typename get_index_type<I, Args...>::type>
|
||||
T& get(TypeContainer<Args...>& c)
|
||||
|
@ -296,7 +297,8 @@ T& get(TypeContainer<Args...>& c)
|
|||
}
|
||||
|
||||
template <size_t I,
|
||||
template <typename...> class TypeContainer,
|
||||
template <typename...>
|
||||
class TypeContainer,
|
||||
typename... Args,
|
||||
typename T = typename get_index_type<I, Args...>::type>
|
||||
const T& get(const TypeContainer<Args...>& c)
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
bool empty() const { return stop_ == start_; }
|
||||
|
||||
T length() const { return stop_ - start_; }
|
||||
auto length() -> decltype(std::declval<T>() - std::declval<T>()) const { return stop_ - start_; }
|
||||
|
||||
void set(T start_point, T stop_point)
|
||||
{
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
#include "basic_vnf_api.h"
|
||||
#include "common.h"
|
||||
#include "srslte/adt/choice_type.h"
|
||||
#include "srslte/common/block_queue.h"
|
||||
#include "srslte/common/buffer_pool.h"
|
||||
#include "srslte/common/choice_type.h"
|
||||
#include "srslte/common/logmap.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <atomic>
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
#ifndef SRSLTE_FSM_H
|
||||
#define SRSLTE_FSM_H
|
||||
|
||||
#include "srslte/adt/detail/type_utils.h"
|
||||
#include "srslte/adt/move_callback.h"
|
||||
#include "srslte/common/logmap.h"
|
||||
#include "type_utils.h"
|
||||
#include <cstdio>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "srslte/common/choice_type.h"
|
||||
#include "srslte/adt/choice_type.h"
|
||||
#include "srslte/common/test_common.h"
|
||||
|
||||
struct C {
|
||||
|
|
Loading…
Reference in New Issue