From 3989617bde55334cee7dbb0bb0dbd4a4d0125bcb Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 9 Jan 2024 12:39:47 -0800 Subject: [PATCH] [ntcore] NetworkTable::GetStruct: Add I template param (#6183) --- .../native/include/networktables/NetworkTable.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ntcore/src/main/native/include/networktables/NetworkTable.h b/ntcore/src/main/native/include/networktables/NetworkTable.h index e2d14212ba..1d93c8c738 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTable.h +++ b/ntcore/src/main/native/include/networktables/NetworkTable.h @@ -248,9 +248,10 @@ class NetworkTable final { * @param name topic name * @return Topic */ - template - StructTopic GetStructTopic(std::string_view name) const { - return StructTopic{GetTopic(name)}; + template + requires wpi::StructSerializable + StructTopic GetStructTopic(std::string_view name) const { + return StructTopic{GetTopic(name)}; } /** @@ -259,9 +260,10 @@ class NetworkTable final { * @param name topic name * @return Topic */ - template - StructArrayTopic GetStructArrayTopic(std::string_view name) const { - return StructArrayTopic{GetTopic(name)}; + template + requires wpi::StructSerializable + StructArrayTopic GetStructArrayTopic(std::string_view name) const { + return StructArrayTopic{GetTopic(name)}; } /**