[ntcore] NetworkTable: Actually use the I parameter for structs (#6280)

This commit is contained in:
Dustin Spicuzza
2024-01-21 13:57:11 -05:00
committed by GitHub
parent ad18f35477
commit 6fc16264ce

View File

@@ -246,24 +246,27 @@ class NetworkTable final {
* Gets a raw struct serialized value topic.
*
* @param name topic name
* @param info optional struct type info
* @return Topic
*/
template <typename T, typename... I>
requires wpi::StructSerializable<T, I...>
StructTopic<T, I...> GetStructTopic(std::string_view name) const {
return StructTopic<T, I...>{GetTopic(name)};
StructTopic<T, I...> GetStructTopic(std::string_view name, I... info) const {
return StructTopic<T, I...>{GetTopic(name), std::move(info)...};
}
/**
* Gets a raw struct serialized array topic.
*
* @param name topic name
* @param info optional struct type info
* @return Topic
*/
template <typename T, typename... I>
requires wpi::StructSerializable<T, I...>
StructArrayTopic<T, I...> GetStructArrayTopic(std::string_view name) const {
return StructArrayTopic<T, I...>{GetTopic(name)};
StructArrayTopic<T, I...> GetStructArrayTopic(std::string_view name,
I... info) const {
return StructArrayTopic<T, I...>{GetTopic(name), std::move(info)...};
}
/**