From b9bd7fc09034f3aa4e47eb54a487f437d6b885e6 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 8 Jan 2024 20:27:17 -0800 Subject: [PATCH] [ntcore] NetworkTable::GetStruct: Add I template param --- .../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 e2d14212baa..1d93c8c7389 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)}; } /**