Skip to content

Commit

Permalink
Start switching to tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Dec 24, 2023
1 parent 8803de5 commit 6c5d2a4
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 164 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,13 @@ class NetworkTableInstance 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;
StructTopic<T, I...> GetStructTopic(std::string_view name,
const I&... info) const;

/**
* Gets a raw struct serialized array topic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ inline ProtobufTopic<T> NetworkTableInstance::GetProtobufTopic(
template <typename T, typename... I>
requires wpi::StructSerializable<T, I...>
inline StructTopic<T, I...> NetworkTableInstance::GetStructTopic(
std::string_view name) const {
return StructTopic<T, I...>{GetTopic(name)};
std::string_view name, const I&... info) const {
return StructTopic<T, I...>{GetTopic(name), info...};
}

template <typename T, typename... I>
Expand Down
Loading

0 comments on commit 6c5d2a4

Please sign in to comment.