-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
flutter/packages
#2270Closed
Copy link
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Description
I defined an API of the form:
List<String?> foo(...);
and the resulting C++ code doesn't compile for me. It gets translated to
virtual ErrorOr<std::unique_ptr<flutter::EncodableList>> Foo(...);
which doesn't work because ErrorOr<T> has a const T& rhs constructor that calls T(rhs), which is a deleted copy constructor for std::unique_ptr.
I'm confused about how this new variant of ErrorOr is intended to work now that I'm looking at it in actual use. v is a variant whose types include a T and a std::unique_ptr<T>, which in this case would be a nested double unique_ptr which seems unlikely to be the intent. @azchohfi what was the intended behavior here?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically