Displaying 4 results from an estimated 4 matches for "sinkeu".
Did you mean:
sinked
2013 Nov 21
3
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...gt;’
}
void sinkU(std::unique_ptr<Foo> f) {
f->doit(); // works as expected
}
void sinkE(ErrorOr<Foo*> f) {
f->doit(); // ERROR: member reference base type 'typename remove_reference<Foo *>::type' (aka 'Foo *') is not a structure or union'
}
void sinkEU(ErrorOr<std::unique_ptr<Foo>> f) {
f->doit(); // ERROR: no member named 'doit' in 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >'
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pi...
2013 Nov 22
0
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...ionable whether this should work. ErrorOr<T> models a pointer to
T. So if you had ErrorOr<Foo> f you'd expect to be able to do f->doit(),
but if it's an ErrorOr<Foo*>, jsut like if it were a Foo**, you'd expect to
have to use (*f)->doit().
> }
>
> void sinkEU(ErrorOr<std::unique_ptr<Foo>> f) {
> f->doit(); // ERROR: no member named 'doit' in
> 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >'
>
Same here.
> }
>
>
>
> _______________________________________________
> LLV...
2013 Nov 22
3
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...specialization of ErrorOr<std::unique_ptr<T>> to make -> see through both ErrorOr and unique_ptr?
My overall point is that unique_ptr<> is cool. ErrorOr<> is cool. But when you combine the two, the cool transparency disappears ;-(
-Nick
>
> }
>
> void sinkEU(ErrorOr<std::unique_ptr<Foo>> f) {
> f->doit(); // ERROR: no member named 'doit' in 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >'
>
> Same here.
>
> }
>
>
>
> _______________________________________________...
2013 Nov 22
0
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...ever-null and
thus didn't model a pointer (and overloaded operator '.' for access to the
underlying object) and then composing this unique_ref with ErrorOr would
just add one level of pointery-ness, not two.
- Dave
>
> -Nick
>
>
>
>
>> }
>>
>> void sinkEU(ErrorOr<std::unique_ptr<Foo>> f) {
>> f->doit(); // ERROR: no member named 'doit' in
>> 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >'
>>
>
> Same here.
>
>
>> }
>>
>>
>>
>> _______...