[wpilibc] SendableChooser: static_assert copy- and default-constructibility (#5078)

Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
Starlight220
2023-02-12 16:24:00 +02:00
committed by GitHub
parent e57ded8c39
commit 785e7dd85c

View File

@@ -29,6 +29,10 @@ namespace frc {
template <class T>
class SendableChooser : public SendableChooserBase {
wpi::StringMap<T> m_choices;
static_assert(std::is_copy_constructible_v<T>,
"T must be copy-constructible!");
static_assert(std::is_default_constructible_v<T>,
"T must be default-constructible!");
template <class U>
static U _unwrap_smart_ptr(const U& value);