www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd and C++11

reply "Trass3r" <un known.com> writes:
What's the stance on using C++11 features in the dmd source code 
in the future?
Dec 29 2011
next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source 
 code in the future?
Well, how many C++11 features does DMC support?
Dec 29 2011
parent reply "Trass3r" <un known.com> writes:
On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev 
wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source 
 code in the future?
Well, how many C++11 features does DMC support?
*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
Dec 29 2011
next sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 29/12/2011 16:16, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?
Well, how many C++11 features does DMC support?
*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
http://www.digitalmars.com/ctg/CPP0x-Language-Implementation.html -- Robert http://octarineparrot.com/
Dec 31 2011
parent Trass3r <un known.com> writes:
 http://www.digitalmars.com/ctg/CPP0x-Language-Implementation.html
It supports decltype but not auto?? Range for loop would also be nice to have.
Dec 31 2011
prev sibling parent reply Sean Cavanaugh <WorksOnMyMachine gmail.com> writes:
On 12/29/2011 10:16 AM, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?
Well, how many C++11 features does DMC support?
*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily)
Jan 01 2012
next sibling parent reply Mail Mantis <mail.mantis.88 gmail.com> writes:
2012/1/2 Sean Cavanaugh <WorksOnMyMachine gmail.com>

 On 12/29/2011 10:16 AM, Trass3r wrote:

 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:

 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:

 What's the stance on using C++11 features in the dmd source code in
 the future?
Well, how many C++11 features does DMC support?
*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily) One of the reasons I've switched to g++ lately. As for D - it already
natively supports many C++11 features(or vise-versa), but I wonder if the user-defined literals will ever make into it.
Jan 01 2012
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/1/2012 4:30 PM, Mail Mantis wrote:
As for D - it already natively
 supports many C++11 features(or vise-versa), but I wonder if the user-defined
 literals will ever make into it.
With CTFE D has far better than user defined literals.
Jan 01 2012
parent reply Mail Mantis <mail.mantis.88 gmail.com> writes:
2012/1/2 Walter Bright <newshound2 digitalmars.com>

 On 1/1/2012 4:30 PM, Mail Mantis wrote:

 As for D - it already natively
 supports many C++11 features(or vise-versa), but I wonder if the
 user-defined
 literals will ever make into it.
With CTFE D has far better than user defined literals.
If I undestood you correctly... Potentially, yes, But, from syntactical point of view, is there any predefined mean to make something like "a = 2_x + 3_y * 180_deg" expression? I'm asking because the "mixin( foo( import( .... )))" are a bit too unfriendly in terms of error reports they yield. If there are better ways of doing so, I'd definitely want to know it.
Jan 01 2012
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 2 January 2012 at 01:14:43 UTC, Mail Mantis wrote:
 If I undestood you correctly...
 Potentially, yes, But, from syntactical point of view, is there 
 any [...]
http://drdobbs.com/blogs/tools/229401068 In std.conv, the octal template is one example: int a = octal!755; Another thing I like doing is using simple structs. For instance: struct Html { string src; } Usage: Html myhtml = Html("<b>some text</b>"); Which is really easy too.
Jan 01 2012
parent Mail Mantis <mail.mantis.88 gmail.com> writes:
2012/1/2 Adam D. Ruppe <destructionator gmail.com>

 On Monday, 2 January 2012 at 01:14:43 UTC, Mail Mantis wrote:

 If I undestood you correctly...
 Potentially, yes, But, from syntactical point of view, is there any [...]
http://drdobbs.com/blogs/**tools/229401068<http://drdobbs.com/blogs/tools/229401068> In std.conv, the octal template is one example: int a = octal!755;
And the above example may be rewritten as: a = x!2 + y!3 * deg!180; Thank you, totally forgot about this
Jan 02 2012
prev sibling parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <xtzgzorex gmail.com> writes:
On 02-01-2012 01:15, Sean Cavanaugh wrote:
 On 12/29/2011 10:16 AM, Trass3r wrote:
 On Thursday, 29 December 2011 at 16:00:47 UTC, Vladimir Panteleev wrote:
 On Thursday, 29 December 2011 at 15:58:55 UTC, Trass3r wrote:
 What's the stance on using C++11 features in the dmd source code in
 the future?
Well, how many C++11 features does DMC support?
*sigh* Totally forgot about that. Can't we finally get rid of that crappy toolchain :'( btw, wasn't there a patch to make dmd compile with VisualStudio cl?
Visual Studio support of C++11 is pretty weak (or maybe more accurately 'spotty') in VS2010, and this will be virtually unchanged in the next version. On the plus side what is there (rvalue references, auto) is nice to have. On the downside what is missing is really sad (varaidic templates, range for, the full set of C++11 type traits, the new unicode string types and literals, initializer lists, and a few others I can't remember easily)
It has lambdas. That's already a HUGE plus, imo more important than most other features. - Alex
Jan 02 2012
prev sibling parent Trass3r <un known.com> writes:
Did a quick test, dmd compiles fine with -gnu++0x -fpermissive (gcc 4.6.1)
Can anyone try with dmc?
Jan 04 2012