Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Visual Studio C++ 2012 is adding variadic templates (http://www.velocityreviews.com/forums/t954235-visual-studio-c-2012-is-adding-variadic-templates.html)

Lynn McGuire 11-05-2012 10:14 PM

Visual Studio C++ 2012 is adding variadic templates
 
Visual Studio C++ 2012 is adding variadic templates
and initializer lists to Visual Studio 2012.
http://arstechnica.com/information-t...cs-more-often/

Looks like MS is trying to stay up to speed.

Lynn

Stuart 11-05-2012 10:48 PM

Re: Visual Studio C++ 2012 is adding variadic templates
 
Am 11/5/12 11:14 PM, schrieb Lynn McGuire:
> Visual Studio C++ 2012 is adding variadic templates
> and initializer lists to Visual Studio 2012.
>
> http://arstechnica.com/information-t...cs-more-often/
>
>
> Looks like MS is trying to stay up to speed.
>
> Lynn


Gosh, that was fast.

I mean, we only started to ramble about VC's (non-)support of variadic
templates six days ago ...

Stuart

Lynn McGuire 11-06-2012 12:03 AM

Re: Visual Studio C++ 2012 is adding variadic templates
 
On 11/5/2012 4:48 PM, Stuart wrote:
> Am 11/5/12 11:14 PM, schrieb Lynn McGuire:
>> Visual Studio C++ 2012 is adding variadic templates
>> and initializer lists to Visual Studio 2012.
>>
>> http://arstechnica.com/information-t...cs-more-often/
>>
>>
>> Looks like MS is trying to stay up to speed.
>>
>> Lynn

>
> Gosh, that was fast.
>
> I mean, we only started to ramble about VC's (non-)support of variadic templates six days ago ...
>
> Stuart


I think that they knew that they were behind
but it is hard to tell what MS thinks. To me,
MS is very fragmented.

Lynn

Melzzzzz 11-06-2012 02:57 AM

Re: Visual Studio C++ 2012 is adding variadic templates
 
On Mon, 05 Nov 2012 16:14:32 -0600
Lynn McGuire <lmc@winsim.com> wrote:

> Visual Studio C++ 2012 is adding variadic templates
> and initializer lists to Visual Studio 2012.
> http://arstechnica.com/information-t...cs-more-often/
>
> Looks like MS is trying to stay up to speed.
>
> Lynn


Great, but way lags behind g++. All in all we can get g++ from svn
repository and get new features immediately...


Jorgen Grahn 11-06-2012 09:57 AM

Re: Visual Studio C++ 2012 is adding variadic templates
 
On Tue, 2012-11-06, Melzzzzz wrote:
> On Mon, 05 Nov 2012 16:14:32 -0600
> Lynn McGuire <lmc@winsim.com> wrote:
>
>> Visual Studio C++ 2012 is adding variadic templates
>> and initializer lists to Visual Studio 2012.
>> http://arstechnica.com/information-t...cs-more-often/
>>
>> Looks like MS is trying to stay up to speed.
>>
>> Lynn

>
> Great, but way lags behind g++. All in all we can get g++ from svn
> repository and get new features immediately...


Yes, but if you're writing software which is supposed to work
reliably, that's really of little use. Although it allow you to toy
with and learn new features early.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Thomas Richter 11-06-2012 01:47 PM

Re: Visual Studio C++ 2012 is adding variadic templates
 
Am 06.11.2012 10:57, schrieb Jorgen Grahn:
> On Tue, 2012-11-06, Melzzzzz wrote:
>> On Mon, 05 Nov 2012 16:14:32 -0600
>> Lynn McGuire<lmc@winsim.com> wrote:
>>
>>> Visual Studio C++ 2012 is adding variadic templates
>>> and initializer lists to Visual Studio 2012.
>>> http://arstechnica.com/information-t...cs-more-often/
>>>
>>> Looks like MS is trying to stay up to speed.
>>>
>>> Lynn

>>
>> Great, but way lags behind g++. All in all we can get g++ from svn
>> repository and get new features immediately...

>
> Yes, but if you're writing software which is supposed to work
> reliably, that's really of little use. Although it allow you to toy
> with and learn new features early.


Is it? Actually, g++ is here also used for production code - not on the
windows platform, though.

Melzzzzz 11-06-2012 03:20 PM

Re: Visual Studio C++ 2012 is adding variadic templates
 
On 6 Nov 2012 09:57:48 GMT
Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:

> On Tue, 2012-11-06, Melzzzzz wrote:
> > On Mon, 05 Nov 2012 16:14:32 -0600
> > Lynn McGuire <lmc@winsim.com> wrote:
> >
> >> Visual Studio C++ 2012 is adding variadic templates
> >> and initializer lists to Visual Studio 2012.
> >> http://arstechnica.com/information-t...cs-more-often/
> >>
> >> Looks like MS is trying to stay up to speed.
> >>
> >> Lynn

> >
> > Great, but way lags behind g++. All in all we can get g++ from svn
> > repository and get new features immediately...

>
> Yes, but if you're writing software which is supposed to work
> reliably, that's really of little use. Although it allow you to toy
> with and learn new features early.
>
> /Jorgen
>


Well this is short introspection of new features from gcc 4.8 ;)
It is pretty reliable, I think...

#include <iostream>
#include <mutex>
#include <thread>

class A{
public:
A(int i):i(i){}
alignas(double) int i;
};

class alignas(16) B:public A{
public:
B():B(42){}
using A::A;
};

void f(int i)
{
static thread_local B b(i);
static std::mutex m;
std::lock_guard<std::mutex> g(m);
std::cout<<b.i<<'\n';
}

int main()
{
std::thread a(f,1);
std::thread b(f,2);
a.join();
b.join();
}

bmaxa@maxa:~/examples$ g++-trunk -std=c++11 -pthread inherit.cpp -o inherit

bmaxa@maxa:~/examples$ ./inherit
1
2



Jorgen Grahn 11-06-2012 05:30 PM

Re: Visual Studio C++ 2012 is adding variadic templates
 
On Tue, 2012-11-06, David Brown wrote:
> On 06/11/2012 14:47, Thomas Richter wrote:
>> Am 06.11.2012 10:57, schrieb Jorgen Grahn:
>>> On Tue, 2012-11-06, Melzzzzz wrote:

....
>>>> Great, but way lags behind g++. All in all we can get g++ from
>>>> svn repository and get new features immediately...
>>>
>>> Yes, but if you're writing software which is supposed to work
>>> reliably, that's really of little use. Although it allow you to
>>> toy with and learn new features early.

>>
>> Is it? Actually, g++ is here also used for production code - not on
>> the windows platform, though.

>
> I'm guessing it's the "from svn repository" bit that was being referred
> to here.


Yes, that's what I meant. I can't remember the last time I compiled
with anything /but/ gcc! But it's typically a gcc version which is
a few years old: 3.4, 4.1, 4.4 ...

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.