WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
wpi::HasNestedStruct Concept Reference

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

#include <wpi/struct/Struct.h>

Concept definition

template<typename T, typename... I>
StructSerializable<T, I...> &&
requires(function_ref<void(std::string_view, std::string_view)> fn,
const I&... info) {
Struct<typename std::remove_cvref_t<T>,
typename std::remove_cvref_t<I>...>::ForEachNested(fn, info...);
}
Specifies that a struct type has nested struct declarations.
Definition Struct.h:120
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.h:69

Detailed Description

Specifies that a struct type has nested struct declarations.

In addition to meeting StructSerializable, implementations must define a wpi::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.