Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Daniel Kozak via Digitalmars-d-learn
http://forum.dlang.org/post/xpmpakmusudanwuzz...@forum.dlang.org https://issues.dlang.org/show_bug.cgi?id=9631 On Tue, May 30, 2017 at 1:07 PM, Biotronic via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Tuesday, 30 May 2017 at 10:46:12 UTC, Andrew Edwards wrote: > >> On

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 10:46:12 UTC, Andrew Edwards wrote: On Tuesday, 30 May 2017 at 10:37:58 UTC, Biotronic wrote: On Tuesday, 30 May 2017 at 10:31:24 UTC, Daniel Kozak wrote: import std.traits : fqn = fullyQualifiedName; Darnit. I just googled the template and got a result talking

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Andrew Edwards via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 10:37:58 UTC, Biotronic wrote: On Tuesday, 30 May 2017 at 10:31:24 UTC, Daniel Kozak wrote: import std.traits : fqn = fullyQualifiedName; Darnit. I just googled the template and got a result talking about fqn!T. So yeah - this code: import std.traits;

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 10:31:24 UTC, Daniel Kozak wrote: import std.traits : fqn = fullyQualifiedName; Darnit. I just googled the template and got a result talking about fqn!T. So yeah - this code: import std.traits; pragma(msg, fullyQualifiedName!ImVec2); pragma(msg,

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 10:20:53 UTC, Andrew Edwards wrote: Sorry, rough day. Could someone please explain what this means and how do go about resolving it? Thanks, Andrew If you want to resolve it just do const label_size = CalcTextSize(...); but as others have mentioned make sure

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Daniel Kozak via Digitalmars-d-learn
import std.traits : fqn = fullyQualifiedName; On Tue, May 30, 2017 at 12:24 PM, Biotronic via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Tuesday, 30 May 2017 at 10:09:50 UTC, Andrew Edwards wrote: > >> What does that even mean? >> >> Scenario: >> >> bool func(const

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 30 May 2017 at 10:09:50 UTC, Andrew Edwards wrote: What does that even mean? Scenario: bool func(const ImVec2 label_size) { return true; } void main() { //first attempt: const ImVec2 label_size = CalcTextSize(label.ptr, null, true); //Error: cannot implicitly

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Andrew Edwards via Digitalmars-d-learn
Sorry, rough day. Could someone please explain what this means and how do go about resolving it? Thanks, Andrew

Re: Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Daniel Kozak via Digitalmars-d-learn
It seems there are two different ImVec2 types. So ImVec2 is not same as ImVec2 :) On Tue, May 30, 2017 at 12:09 PM, Andrew Edwards via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > What does that even mean? > > Scenario: > > bool func(const ImVec2 label_size) > { > return

Error: func(const(A) a) is not callable using argument types (const(A)

2017-05-30 Thread Andrew Edwards via Digitalmars-d-learn
What does that even mean? Scenario: bool func(const ImVec2 label_size) { return true; } void main() { //first attempt: const ImVec2 label_size = CalcTextSize(label.ptr, null, true); //Error: cannot implicitly convert expression (CalcTextSize(cast(immutable(char)*)label, null,