mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] NetworkTable::GetStruct: Add I template param (#6183)
This commit is contained in:
@@ -248,9 +248,10 @@ class NetworkTable final {
|
||||
* @param name topic name
|
||||
* @return Topic
|
||||
*/
|
||||
template <wpi::StructSerializable T>
|
||||
StructTopic<T> GetStructTopic(std::string_view name) const {
|
||||
return StructTopic<T>{GetTopic(name)};
|
||||
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)};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,9 +260,10 @@ class NetworkTable final {
|
||||
* @param name topic name
|
||||
* @return Topic
|
||||
*/
|
||||
template <wpi::StructSerializable T>
|
||||
StructArrayTopic<T> GetStructArrayTopic(std::string_view name) const {
|
||||
return StructArrayTopic<T>{GetTopic(name)};
|
||||
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)};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user