<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 16, 2015 at 3:41 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>> - return std::unique_ptr<Module>(ModuleOrErr.get());<br>
>> + return std::move(ModuleOrErr.get());<br>
><br>
><br>
> You could probably just "return ModuleOrErr;" here?<br>
><br>
<br>
<br>
</span>No:<br>
<br>
IRReader.cpp:44:12: error: no viable conversion from<br>
'ErrorOr<std::unique_ptr<Module> >' to 'std::unique_ptr<Module>'<br></blockquote><div><br>Ah, right, sorry - missed the 'get()'.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>