Slashdot Mirror


C++14 Is Set In Stone

jones_supa (887896) writes "Apart from minor editorial tweaks, the ISO C++14 standard can be considered completed. Implementations are already shipping by major suppliers. C++14 is mostly an incremental update over C++11 with some new features like function return type deduction, variable templates, binary literals, generic lambdas, and so on. The official C++14 specification release will arrive later in the year, but for now Wikipedia serves as a good overview of the feature set."

7 of 193 comments (clear)

  1. Re:Still... by makq · · Score: 5, Funny

    Various black hats appreciate your dedication to C.

  2. Re:Support for your position by Anonymous Coward · · Score: 5, Funny

    You boob. Take your puns and go.

  3. Re:Still... by Anonymous Coward · · Score: 5, Informative

    Though, annoyingly, they didn't seem to allow use of something like _ to break long literals up into human-readable groups.

    Yes they did. It's not underscore, it's apostrophe. For example:
            auto a = 0b100'0001; // ASCII 'A'
            auto million = 1'000'000;

    See here:
            http://isocpp.org/wiki/faq/cpp14-language#digit-separators>http://isocpp.org/wiki/faq/cpp14-language#digit-separators

  4. Re:Still... by Imagix · · Score: 5, Informative

    Uh, yes they do. Don't rely on summaries to list all of the features of the language. From N3797: An integer literal is a sequence of digits that has no period or exponent part, with optional separating single quotes that are ignored when determining its value. Example: The number twelve can be written 12, 014, 0XC, or 0b1100. The literals 1048576, 1’048’576, 0X100000, 0x10’0000, and 0’004’000’000 all have the same value. — end example

  5. Re:Why do we need Auto? by kthreadd · · Score: 5, Informative

    Auto does not mean loose typing. It still has a type, you just don't have to write it but it will be there and will be enforced by the compiler.

  6. Re:Oh god so what? by ShanghaiBill · · Score: 5, Interesting

    But here's the catch: you're not supposed to know it all. C++ is like a large store where you go and "shop" just the features you need. You can keep it super simple and write C-style code and just use classes as the only C++ feature, if you want to.

    That is fine if you are a team of one, and you never read code written by others.

  7. Back to the future by T.E.D. · · Score: 5, Funny

    with some new features like function return type deduction,

    Hey, K&R C had function return type deduction back in the 70's .

    ...of course it always guessed "int", but IT HAD IT.