Some compile time help..

Artur Skawina art.08.09 at gmail.com
Mon Mar 5 03:50:23 PST 2012


On 03/04/12 18:14, Andrej Mitrovic wrote:
> On 3/4/12, Daniel Murphy <yebblies at nospamgmail.com> wrote:
>> void f(Args...)(Args args) {
>>   foreach(i, T; Args)
>>   {
>>     static if (isSomeString!T) args[i] = toUTFz(args[i]);
>>   }
>>   needs_wchar_t(args);
>> }
> 
> toUTFz returns a pointer, the isSomeString checks if a type is a
> string. IOW that will try to assign a pointer to a string.

http://forum.dlang.org/thread/op.v94npikmx8p62v@simendsjo-desktop#post-mailman.940.1330024934.20196.digitalmars-d-learn:40puremagic.com



More information about the Digitalmars-d-learn mailing list