mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilibc] SendableChooser: Remove unusable std::unique_ptr case (#6357)
This commit is contained in:
@@ -36,9 +36,6 @@ class SendableChooser : public SendableChooserBase {
|
||||
template <class U>
|
||||
static U _unwrap_smart_ptr(const U& value);
|
||||
|
||||
template <class U>
|
||||
static U* _unwrap_smart_ptr(const std::unique_ptr<U>& value);
|
||||
|
||||
template <class U>
|
||||
static std::weak_ptr<U> _unwrap_smart_ptr(const std::shared_ptr<U>& value);
|
||||
|
||||
@@ -71,8 +68,8 @@ class SendableChooser : public SendableChooserBase {
|
||||
void SetDefaultOption(std::string_view name, T object);
|
||||
|
||||
/**
|
||||
* Returns a copy of the selected option (a raw pointer U* if T =
|
||||
* std::unique_ptr<U> or a std::weak_ptr<U> if T = std::shared_ptr<U>).
|
||||
* Returns a copy of the selected option (a std::weak_ptr<U> if T =
|
||||
* std::shared_ptr<U>).
|
||||
*
|
||||
* If there is none selected, it will return the default. If there is none
|
||||
* selected and no default, then it will return a value-initialized instance.
|
||||
|
||||
@@ -121,13 +121,6 @@ U SendableChooser<T>::_unwrap_smart_ptr(const U& value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
requires std::copy_constructible<T> && std::default_initializable<T>
|
||||
template <class U>
|
||||
U* SendableChooser<T>::_unwrap_smart_ptr(const std::unique_ptr<U>& value) {
|
||||
return value.get();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
requires std::copy_constructible<T> && std::default_initializable<T>
|
||||
template <class U>
|
||||
|
||||
Reference in New Issue
Block a user