WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::HasNestedStruct Concept Reference

Specifies that a struct type has nested struct declarations. More...

#include <wpi/util/struct/Struct.hpp>

Concept definition

template<typename T, typename... I>
StructSerializable<T, I...> &&
requires(function_ref<void(std::string_view, std::string_view)> fn,
const I&... info) {
typename std::remove_cvref_t<I>...>::ForEachNested(fn, info...);
}
An efficient, type-erasing, non-owning reference to a callable.
Definition function_ref.hpp:31
Specifies that a struct type has nested struct declarations.
Definition Struct.hpp:120
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.hpp:69
Struct serialization template.
Definition Struct.hpp:39

Detailed Description

Specifies that a struct type has nested struct declarations.

In addition to meeting StructSerializable, implementations must define a wpi::util::Struct<T> static member void ForEachNested(std::invocable<std::string_view, std::string_view) auto fn) (or equivalent) and call ForEachStructSchema<Type> on each nested struct type.