fix
This commit is contained in:
parent
a1ed40fe56
commit
892cb3e061
@ -122,7 +122,7 @@ namespace cpputils {
|
|||||||
// warning: opposed to the other left_opt variants, this one already moves the content and returns by value.
|
// warning: opposed to the other left_opt variants, this one already moves the content and returns by value.
|
||||||
boost::optional<Left> left_opt() && noexcept(noexcept(boost::optional<Left>(std::move(std::declval<either<Left, Right>>()._left)))) {
|
boost::optional<Left> left_opt() && noexcept(noexcept(boost::optional<Left>(std::move(std::declval<either<Left, Right>>()._left)))) {
|
||||||
if (_side == Side::left) {
|
if (_side == Side::left) {
|
||||||
return std::move(_left);
|
return std::move(_left); // NOLINT(cppcoreguidelines-pro-type-union-access)
|
||||||
} else {
|
} else {
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ namespace cpputils {
|
|||||||
// warning: opposed to the other left_opt variants, this one already moves the content and returns by value.
|
// warning: opposed to the other left_opt variants, this one already moves the content and returns by value.
|
||||||
boost::optional<Right> right_opt() && noexcept(noexcept(boost::optional<Right>(std::move(std::declval<either<Left, Right>>()._right)))) {
|
boost::optional<Right> right_opt() && noexcept(noexcept(boost::optional<Right>(std::move(std::declval<either<Left, Right>>()._right)))) {
|
||||||
if (_side == Side::right) {
|
if (_side == Side::right) {
|
||||||
return std::move(_right);
|
return std::move(_right); // NOLINT(cppcoreguidelines-pro-type-union-access)
|
||||||
} else {
|
} else {
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user