milbrandt / ModernCpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neu in C++11 https://en.wikipedia.org/wiki/C%2B%2B11

  1. Templates

    • Nicht mehr wegzudenken
    • Performance
    • "Generics"

"With respect to C++, the syntax and idioms of template metaprogramming are esoteric compared to conventional C++ programming, and template metaprograms can be very difficult to understand. [6][7]"

  1. Type inference Auto & decltype (https://en.wikipedia.org/wiki/C%2B%2B11#constexpr_.E2.80.93_Generalized_constant_expressions)

  2. Lambda functions & Expressions capture -> return_type { function_body }

  1. New function syntax auto funcname(parameters) -> return_type { function_body }

  2. Uniform initialization and Object construction - new type_name{} - delegate constructors (members, this(), super() via using)

  3. Strong typed enumerations - Enum classes

  4. Type/Template aliases using type_name = other_type

  5. (Custom suffixes)

  6. (= default and = delete)

  7. (Attributes)

    int [[attr1]] i [[attr2, attr3]];

    [[attr4(arg1, arg2)]] if (cond) { [[vendor::attr5]] return i; }

    [[deprecated("g() is thread-unsafe. Use h() instead")]] // C++ 14

  8. Zusätzliche Konstrukturtypen: Move Constructor, inherited and delegating constructors https://blog.smartbear.com/c-plus-plus/c11-tutorial-introducing-the-move-constructor-and-the-move-assignment-operator/

  9. CPP Core Guidelines https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

  10. Zukunft CPP = Boost Library http://www.boost.org/

  11. RAII - Smart Pointer - http://en.cppreference.com/w/cpp/memory/unique_ptr/unique_ptr

Ressourcen

About


Languages

Language:C++ 95.1%Language:C 4.9%