Visual Studio C++ 2012 is adding variadic templates

Discussion in 'C++' started by Lynn McGuire, Nov 5, 2012.

  1. Lynn McGuire

    Lynn McGuire Guest

    Lynn McGuire, Nov 5, 2012
    #1
    1. Advertising

  2. Lynn McGuire

    Stuart Guest

    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-...to-the-mainstream-with-more-specs-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
    Stuart, Nov 5, 2012
    #2
    1. Advertising

  3. Lynn McGuire

    Lynn McGuire Guest

    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-...to-the-mainstream-with-more-specs-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
    Lynn McGuire, Nov 6, 2012
    #3
  4. Lynn McGuire

    Melzzzzz Guest

    On Mon, 05 Nov 2012 16:14:32 -0600
    Lynn McGuire <> wrote:

    > Visual Studio C++ 2012 is adding variadic templates
    > and initializer lists to Visual Studio 2012.
    > http://arstechnica.com/information-...to-the-mainstream-with-more-specs-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...
    Melzzzzz, Nov 6, 2012
    #4
  5. Lynn McGuire

    Jorgen Grahn Guest

    On Tue, 2012-11-06, Melzzzzz wrote:
    > On Mon, 05 Nov 2012 16:14:32 -0600
    > Lynn McGuire <> wrote:
    >
    >> Visual Studio C++ 2012 is adding variadic templates
    >> and initializer lists to Visual Studio 2012.
    >> http://arstechnica.com/information-...to-the-mainstream-with-more-specs-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 .
    Jorgen Grahn, Nov 6, 2012
    #5
  6. 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<> wrote:
    >>
    >>> Visual Studio C++ 2012 is adding variadic templates
    >>> and initializer lists to Visual Studio 2012.
    >>> http://arstechnica.com/information-...to-the-mainstream-with-more-specs-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.
    Thomas Richter, Nov 6, 2012
    #6
  7. Lynn McGuire

    Melzzzzz Guest

    On 6 Nov 2012 09:57:48 GMT
    Jorgen Grahn <> wrote:

    > On Tue, 2012-11-06, Melzzzzz wrote:
    > > On Mon, 05 Nov 2012 16:14:32 -0600
    > > Lynn McGuire <> wrote:
    > >
    > >> Visual Studio C++ 2012 is adding variadic templates
    > >> and initializer lists to Visual Studio 2012.
    > >> http://arstechnica.com/information-...to-the-mainstream-with-more-specs-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
    Melzzzzz, Nov 6, 2012
    #7
  8. Lynn McGuire

    Jorgen Grahn Guest

    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 .
    Jorgen Grahn, Nov 6, 2012
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Walters
    Replies:
    2
    Views:
    508
    Ben Pfaff
    Feb 13, 2004
  2. Ross A. Finlayson
    Replies:
    19
    Views:
    580
    Keith Thompson
    Mar 10, 2005
  3. Replies:
    2
    Views:
    332
    Dave Thompson
    Feb 27, 2006
  4. Replies:
    5
    Views:
    351
  5. hkaiser
    Replies:
    3
    Views:
    553
    Ebenezer
    Jan 13, 2012
Loading...

Share This Page