C++14: Through the Looking Glass

Download this episode

Download Video


“The time has come,” the ISO said, “To talk of many things:  Of move-capture—and literals— Of making lambdas sing— And why deduction is so hot— And if digits should grow wings?”

So have you heard of the next C++ Standard? No, it is not C++11. Even though C++11 has just been ratified, C++14 will likely replace C++11 by next year. By now, we have enough experience with C++11 to know where we are missing various fingers and toes such as:

  • Why do we not have move capture in lambdas? 
  • How about some real user-defined literal suffixes? 
  • Why did we stop with monomorphic lambdas? 
  • If lambda returns can be deduced, why not normal functions? 
  • Could we get digit separators?

C++14 will be more than a bug-fix release, and will contain some important enhancements on top of C++11. It will remove some of the major annoyances from C++11, that we already know of. But more importantly, how will this change the language, library and some important idioms?



Source Code







Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image

      What about back tick (`) as a number group separator?

      This could work for decimal (1`000`000) or hex (0xFFFF`0000) literals. Also, the proposed binary literals (0b0101`1000). If it were an ignored part of the number syntax, it would also make column alignment easier within tables.

      static const char table[] = {
        ``0, ``1, ``2,
        `10, `11, `12,
        100, 101, 102

    • User profile image

      Not sure that issue with a number group separator worth the effort... In a few cases where you would really need it, you can use preprocessor.

      #include <boost/preprocessor/cat.hpp>
      #include <boost/preprocessor/facilities/empty.hpp>
      #include <boost/preprocessor/variadic/size.hpp>
      #include <boost/preprocessor/control/if.hpp>
      #include <boost/preprocessor/facilities/empty.hpp>
      int n = N(100,200,100);


    • User profile image

      I'm one of those people who would greatly prefer `strong typedefs` to user-defined literals... is there any proposal already?

    • User profile image


      Yes, see N3741, "Toward Opaque Typedefs for C++1Y, v2" by Walter E. Brown:

    • User profile image

      What would you guys think about named function arguments?

      A proposal for syntax I've got here https://github.com/berkus/cpp_named_args

    • User profile image

      Since there is new user defined literal, why don't you use the string + suffix + comma as separator and the compiler will figure it out at compile time for long number const

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.