hello what is the right syntax for this:
import std.stdio, std.conv;
void main(string args[])
{
ubyte[3] src = [0, 1, 2];
string trg = "";
@property ubyte[3] srcAsProp(){return src;}
// Error: template std.conv.to cannot dedu
On Tuesday, 15 July 2014 at 00:19:15 UTC, Ali Çehreli wrote:
On 07/14/2014 05:10 PM, Ali Çehreli wrote:
> On 07/14/2014 04:04 PM, H. S. Teoh via Digitalmars-d-learn
wrote:
>
> > On Mon, Jul 14, 2014 at 09:12:30PM +0000, Klb via
Digitalmars-d-learn
> wrote:
> >> hello
...and any example where this switch will be usefull ?
Hello, I'd like to know if it's possible, using CTFE, mixin etc
to convert a POD struct to a class at compile time.
I've reached the step where the string to mix-in is generated but
I cant mix it:
-
import std.stdio;
import std.trait
On Wednesday, 16 July 2014 at 18:09:10 UTC, Adam D. Ruppe wrote:
On Wednesday, 16 July 2014 at 17:43:03 UTC, Klb wrote:
auto names = __traits(allMembers, S);
Error: static variable _names_field_0 cannot be read at
compile time.
The problem there is names is a regular runtime variable an
On Wednesday, 16 July 2014 at 18:09:10 UTC, Adam D. Ruppe wrote:
On Wednesday, 16 July 2014 at 17:43:03 UTC, Klb wrote:
auto names = __traits(allMembers, S);
Error: static variable _names_field_0 cannot be read at
compile time.
The problem there is names is a regular runtime variable an
hello, I'd like to test if it's possible to add an automatic
radix detection in std.conv, parse.
I've added...
if (s.length >= 2)
{
if (s[0..2] == "0x" || s[0..2] == "0X")
{
uint radix = 16;
Source nbr = s[2..$];