search for: factoryeu

Displaying 4 results from an estimated 4 matches for "factoryeu".

Did you mean: factorye
2013 Nov 21
3
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...k struct Foo { void doit(); }; std::unique_ptr<Foo> factoryU() { std::unique_ptr<Foo> f(new Foo); return f; // works as expected } ErrorOr<Foo*> factoryE() { ErrorOr<Foo*> f = new Foo; return f; // works as expected } ErrorOr<std::unique_ptr<Foo>> factoryEU() { std::unique_ptr<Foo> f(new Foo); return f; // ERROR: call to implicitly-deleted copy constructor of 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >’ } void sinkU(std::unique_ptr<Foo> f) { f->doit(); // works as expected } void sinkE(ErrorOr&lt...
2013 Nov 22
0
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...tr<Foo> factoryU() { > std::unique_ptr<Foo> f(new Foo); > return f; // works as expected > } > > ErrorOr<Foo*> factoryE() { > ErrorOr<Foo*> f = new Foo; > return f; // works as expected > } > > ErrorOr<std::unique_ptr<Foo>> factoryEU() { > std::unique_ptr<Foo> f(new Foo); > return f; // ERROR: call to implicitly-deleted copy constructor of > 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >’ > While a local variable inside a function is implicitly moved when returned, that only ha...
2013 Nov 22
3
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...<Foo> factoryU() { > std::unique_ptr<Foo> f(new Foo); > return f; // works as expected > } > > ErrorOr<Foo*> factoryE() { > ErrorOr<Foo*> f = new Foo; > return f; // works as expected > } > > ErrorOr<std::unique_ptr<Foo>> factoryEU() { > std::unique_ptr<Foo> f(new Foo); > return f; // ERROR: call to implicitly-deleted copy constructor of 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >’ > > While a local variable inside a function is implicitly moved when returned, that only ha...
2013 Nov 22
0
[LLVMdev] ErrorOr<> conflicts with unique_ptr<>
...d::unique_ptr<Foo> f(new Foo); >> return f; // works as expected >> } >> >> ErrorOr<Foo*> factoryE() { >> ErrorOr<Foo*> f = new Foo; >> return f; // works as expected >> } >> >> ErrorOr<std::unique_ptr<Foo>> factoryEU() { >> std::unique_ptr<Foo> f(new Foo); >> return f; // ERROR: call to implicitly-deleted copy constructor of >> 'std::__1::unique_ptr<Foo, std::__1::default_delete<Foo> >’ >> > > While a local variable inside a function is implicitly moved wh...