mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Implementation of getDebugDescription for std::array
Summary: Yoga uses `std::array` a lot (and `std::array` is not a `std::vector`), so it's useful for printing Yoga values. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D21028570 fbshipit-source-id: c6bf114d5362f085ea201ecdc5b7d59646b33ebd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cc07baa87e
commit
e1eef24321
@@ -302,6 +302,23 @@ std::vector<T, Ts...> getDebugChildren(
|
||||
return vector;
|
||||
}
|
||||
|
||||
// `std::array<T, Size>`
|
||||
template <typename T, size_t Size>
|
||||
std::string getDebugName(std::array<T, Size> const &array) {
|
||||
return "List";
|
||||
}
|
||||
|
||||
template <typename T, size_t Size>
|
||||
std::vector<T> getDebugChildren(
|
||||
std::array<T, Size> const &array,
|
||||
DebugStringConvertibleOptions options) {
|
||||
auto vector = std::vector<T>{};
|
||||
for (auto const &value : array) {
|
||||
vector.push_back(value);
|
||||
}
|
||||
return vector;
|
||||
}
|
||||
|
||||
// `std::unordered_set<T>`
|
||||
template <typename T, typename... Ts>
|
||||
std::string getDebugName(std::unordered_set<T, Ts...> const &set) {
|
||||
|
||||
Reference in New Issue
Block a user