qtD

michaelc37 michaelc37 at msn.com
Wed Aug 14 17:42:18 PDT 2013


On Wednesday, 14 August 2013 at 07:20:14 UTC, Benjamin Thaut 
wrote:
> Am 01.08.2013 16:36, schrieb michaelc37:
>>
>> I compiled against Qt4, I want to try it on Qt5 soon but there 
>> is
>> another annoying issue I discovered when trying to update and 
>> compile
>> all of the qtd exmples: All slot functions must now be 
>> declared public..
>> I'm guessing something changed in traits recently.
>>
>
> Yes since dmd 2.061 typeof no longer works on members you don't 
> have access to. But it is possible to bypass this using the 
> tupleof property. See typeOfFieldImpl in
>
> https://github.com/Ingrater/druntime/blob/master/src/core/traits.d
>
> Kind Regards
> Benjamin Thaut

Thanks, i just tried this but it didnt work as i expected or 
maybe i misunderstood.


e.g.

class Test
{
	private void aa(){};
	private int bb;
	public void cc(){};
}

writeln(Test.tupleof.length);  //prints 1
writeln(Test.tupleof[0].stringof);  //prints (Test).bb

it didnt see aa(), or cc()



More information about the Digitalmars-d mailing list