mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-15 08:26:04 +08:00
Corrections from review
This commit is contained in:
parent
6b9dd86b40
commit
8cadfc0b10
@ -10,7 +10,7 @@ title: "type_list"
|
|||||||
|
|
||||||
## type_list
|
## type_list
|
||||||
```cpp
|
```cpp
|
||||||
template <typename... Typelists>>
|
template <typename... Typelists>
|
||||||
struct type_list
|
struct type_list
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
@ -217,7 +217,7 @@ template <typename TTypeList, size_t... Indices>
|
|||||||
struct type_list_select
|
struct type_list_select
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
Selects types from a given `type_list`, according to a list if indices.
|
Selects types from a given `type_list`, according to a list of indices.
|
||||||
Defines `type` as the modified `type_list`.
|
Defines `type` as the modified `type_list`.
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -227,17 +227,17 @@ template <typename TTypeList, size_t... Indices>
|
|||||||
type_list_select_t
|
type_list_select_t
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
Selects types from a given `type_list`, according to a list if indices.
|
Selects types from a given `type_list`, according to a list of indices.
|
||||||
Defined as the modified `type_list`.
|
Defined as the modified `type_list`.
|
||||||
|
|
||||||
## type_list_select_from_indexes
|
## type_list_select_from_indexes
|
||||||
```cpp
|
```cpp
|
||||||
template <typename TTypeList, size_t... Indices
|
template <typename TTypeList, size_t... Indices>
|
||||||
type_list_select_from_indexes
|
type_list_select_from_indexes
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
`type_list_select_from_indexes` is an alias of `type_list_select` to be more consistent with the naming of other type_list metafunctions.
|
`type_list_select_from_indexes` is an alias of `type_list_select` to be more consistent with the naming of other type_list metafunctions.
|
||||||
Selects types from a given `type_list`, according to a list if indices.
|
Selects types from a given `type_list`, according to a list of indices.
|
||||||
Defines `type` as the modified `type_list`.
|
Defines `type` as the modified `type_list`.
|
||||||
|
|
||||||
## type_list_select_from_index_sequence
|
## type_list_select_from_index_sequence
|
||||||
@ -596,7 +596,7 @@ constexpr bool type_list_none_of_v
|
|||||||
**Description**
|
**Description**
|
||||||
Checks that no types in a `type_list` satisfy a unary predicate.
|
Checks that no types in a `type_list` satisfy a unary predicate.
|
||||||
Predicate must be: `template <typename T> struct Pred : etl::bool_constant<...> {};`
|
Predicate must be: `template <typename T> struct Pred : etl::bool_constant<...> {};`
|
||||||
Defined` as `true` or `false`.
|
Defined as `true` or `false`.
|
||||||
From: `C++17`
|
From: `C++17`
|
||||||
|
|
||||||
## type_lists_are_convertible
|
## type_lists_are_convertible
|
||||||
@ -738,19 +738,19 @@ template <typename T, typename... TypeLists>
|
|||||||
struct type_list_in_no_lists
|
struct type_list_in_no_lists
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
Checks if a type `T` is present in at least one of the provided `type_lists`.
|
Checks if a type `T` is present none of the provided `type_lists`.
|
||||||
Inherits from `etl::true_type` if `T` is in any list, otherwise `etl::false_type`.
|
Inherits from `etl::true_type` if `T` is in no list, otherwise `etl::false_type`.
|
||||||
Since: `20.48.0`
|
Since: `20.48.0`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
template <typename T, typename... TypeLists>
|
template <typename T, typename... TypeLists>
|
||||||
constexpr bool type_list_in_no_list_v
|
constexpr bool type_list_in_no_lists_v
|
||||||
```
|
```
|
||||||
**Description**
|
**Description**
|
||||||
Checks if a type `T` is present in at least one of the provided `type_lists`.
|
Checks if a type `T` is present in none of the provided `type_lists`.
|
||||||
Defined as `true` if `T` is in any list, otherwise `false`.
|
Defined as `true` if `T` is in no list, otherwise `false`.
|
||||||
Since: `20.48.0`
|
Since: `20.48.0`
|
||||||
From: `C++17`
|
From: `C++17`
|
||||||
|
|
||||||
|
|||||||
@ -992,11 +992,11 @@ namespace etl
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
// Specialisation if no lists provided.
|
//// Specialisation if no lists provided.
|
||||||
template <typename T>
|
//template <typename T>
|
||||||
struct type_list_in_any_list<T> : etl::false_type
|
//struct type_list_in_any_list<T> : etl::false_type
|
||||||
{
|
//{
|
||||||
};
|
//};
|
||||||
|
|
||||||
#if ETL_USING_CPP17
|
#if ETL_USING_CPP17
|
||||||
template <typename T, typename... TypeLists>
|
template <typename T, typename... TypeLists>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user