<div dir="ltr">It seems there are two different ImVec2 types. So <span style="font-size:12.8px">ImVec2 is not same as </span><span style="font-size:12.8px">ImVec2 :)</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 30, 2017 at 12:09 PM, Andrew Edwards via Digitalmars-d-learn <span dir="ltr"><<a href="mailto:digitalmars-d-learn@puremagic.com" target="_blank">digitalmars-d-learn@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What does that even mean?<br>
<br>
Scenario:<br>
<br>
bool func(const ImVec2 label_size)<br>
{<br>
    return true;<br>
}<br>
<br>
void main()<br>
{<br>
    //first attempt:<br>
    const ImVec2 label_size = CalcTextSize(label.ptr, null, true);<br>
    //Error: cannot implicitly convert expression (CalcTextSize(cast(immutable(c<wbr>har)*)label, null, true, -1F)) of type ImVec2 to const(ImVec2)<br>
<br>
    //second attempt<br>
    const ImVec2 label_size = cast(const)CalcTextSize(label.<wbr>ptr, null, true);<br>
    // Error: cannot implicitly convert expression (CalcTextSize(cast(immutable(c<wbr>har)*)label, null, true, -1F)) of type const(ImVec2) to const(ImVec2)<br>
<br>
    //third attempt<br>
    const auto label_size = CalcTextSize(label.ptr, null, true);<br>
    //Okay: don't know why the other two didn't work but I can keep going for now<br>
<br>
    func(label_size);<br>
    //Error: function imgui_d.func (const(ImVec2) label_size) is not callable using argument types (const(ImVec2))<br>
}<br>
</blockquote></div><br></div>