C++11 - ISO Standards



  • Just a quick question: Is QT SDK fully ISO C++11 compliant at this time? If not, where might I be forced to use deprecated coding styles?

    I am in the process of updating my C++ skill set, and this would be helpful information if I encounter a glitch.

    TIA.

    MJR



  • The SDK uses an old version of GCC (4.4) that has very little C++11 features. http://gcc.gnu.org/projects/cxx0x.html

    In fact there is not a single compiler that is 100% compliant with C++11 yet.



  • THANKS for the link.

    With a lot of the cxx0x features, there is more compliance than most realize. From what I understand from reading literature and reviewing the new ISO C++ Standard, most cxx0x features were approved with the C++11 approval. Or am I misinterpreting what I have read?



  • C++0x was just the working name of c++11



  • [quote author="utcenter" date="1348409245"]The SDK uses an old version of GCC (4.4) that has very little C++11 features. http://gcc.gnu.org/projects/cxx0x.html

    In fact there is not a single compiler that is 100% compliant with C++11 yet.[/quote]

    Visual studio 2012 compiler is almost fully c++11 compatible.



  • [quote author="pwnstar23" date="1348436416"]
    Visual studio 2012 compiler is almost fully c++11 compatible.[/quote]

    LOL, in fact the Visual Studio 2012 compiler is the least compliant with c++11, significantly worse than clang and gcc in core language features support.

    MSVC2010 - http://msdn.microsoft.com/en-us/library/hh567368.aspx
    GCC - http://gcc.gnu.org/projects/cxx0x.html
    CLANG - http://clang.llvm.org/cxx_status.html



  • [quote author="utcenter" date="1348438417"][quote author="pwnstar23" date="1348436416"]
    Visual studio 2012 compiler is almost fully c++11 compatible.[/quote]

    LOL, in fact the Visual Studio 2012 compiler is the least compliant with c++11, significantly worse than clang and gcc in core language features support.

    MSVC2010 - http://msdn.microsoft.com/en-us/library/hh567368.aspx
    GCC - http://gcc.gnu.org/projects/cxx0x.html
    CLANG - http://clang.llvm.org/cxx_status.html

    [/quote]

    The commonly used features are mostly covered. I was careful to not say it was the MOST or better than any other compiler. Just trying to point out that vs2012's c++11 support is good.

    Things like smart pointers, auto keyword, lambda's, rvalue references, move semantics, class enum's, range for loop, nullptr ect are supported.



  • [quote author="pwnstar23" date="1348445410"]I was careful to not say it was the MOST or better than any other compiler. Just trying to point out that vs2012's c++11 support is good.[/quote]
    No, it actually isn't, especially compared to Clang, GCC or ICC.

    MSVC2010 C++11 support is mediocre, and the additions in MSVC2012 are downright disappointing.

    No constant expressions, no defaulted and deleted functions, no constructor inheritance or delegation, no unicode string literals, not even non-static member initializers, variadic templates or initializer lists.

    C++11 does not merely affect implementation, but rather design (which C++11 aimed for, "...think differently about system design and implementation."). And this is only possible to a limited extent with MSVC. You can create C++98 code with C++11 on top of it, but you can't create C++11 code due to the lack of supported features.

    [quote author="TheGunslinger95842" date="1348408549"]Just a quick question: Is QT SDK fully ISO C++11 compliant at this time? If not, where might I be forced to use deprecated coding styles?[/quote]The official requirement for Qt 5 is a C++98-compliant comiler, it does however support a wide variety of C++11 features if present, including move semantics, containers with initializer lists and range-based for and lambdas. See also "C++11 in Qt5":http://woboq.com/blog/cpp11-in-qt5.html.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.