CodeRef
CodeRef
  • Software
    • VSCode
  • Midjourney_AI
    • Midjourney Cheat Sheet
  • aws
    • S3 Reference
    • Services
  • bash
    • .bashrc File Contents
    • CAN
    • _System Config File Locations
    • argument-length-limits
    • Conditionals
    • Data Structures
    • File Permissions
    • File Syncing
    • File System
    • Functions
    • General
    • Loops
    • My Functions
    • Networking
    • Number Operations
    • OpenVPN
    • Operators
    • Resource Management
    • Serial RS232
    • Spinning Wheel Animation
    • SSH
    • Text Operations
    • Environment Variables
  • cpp
    • ChatGPT | Pointers vs. References
    • arrays
    • Classes
    • Data Types / Structures
    • Enumerated Classes
    • Exception Handling
    • Function Objects
    • Functions
    • I/O
    • Loops
    • Macros
    • Namespaces
    • New Features
    • Pointers
    • Scope
    • Smart Pointers
    • Raw String Literals
    • Style Guide
    • Switch Case
    • Templating
    • How to Use tinyxml2
    • Useful Libraries
    • google-test
    • Conditionals
    • Rule of Three/Five
    • Optional Parameters
    • Keywords
    • Filesystem
    • Random
    • Casting
    • tools
  • git
    • Code Review Dependency Strategy
    • Git Bisect Guide
    • Git Reference
    • removing-cherry-picks
    • Useful Tools
    • Graphite Reference
  • js
    • functions
    • Javascript Reference
  • linux
    • Display
    • Dual Boot with Windows
    • File System
    • NVIDIA
    • Sending/Receiving TCP/UDP Messages in Ubuntu
    • dynamically_linked_binaries
  • markdown
    • Images
    • obsidian-reference
  • python
    • Classes
    • Exceptions
    • Functions
    • Operations
    • Python Reference
    • unittest_command-line-args
    • unittest_magicmock_GPT
    • unittest_mock
    • unittest_printing
    • unittest_subtest
    • useful-stuff
    • jupyter
    • poetry
  • ros
    • _ROS Cheat Sheet
    • Create New Workspace
    • Install ROS
    • Node Sample - Listener
    • Node Sample - Talker
    • Node Template
    • Setup
    • urdf
  • excel
    • excel-reference
  • windows
    • File System
    • WSL - Windows Subsystem for Linux
    • WSL
  • software_engineering
    • uncle_bob_lectures
      • Overview
      • Lesson 01 - Notes
  • web
    • Front End
    • Hugo
    • new_frontend_tools
  • sql
    • cheatsheet
Powered by GitBook
On this page
  1. cpp

New Features

Source = ChatGPT

Prompt = "I learned C++ in 2011. What are all the changes that have been added since then?"

  1. C++11 (2011):

    • Lambda Expressions: Allow you to define anonymous functions.

    • Range-based For Loop: Simplifies iterating over containers.

    • Auto Keyword: Enables type inference for variable declarations.

    • Smart Pointers: std::shared_ptr, std::unique_ptr, and std::weak_ptr for improved memory management.

    • Move Semantics: Introduces move constructors and move assignment operators for efficient resource management.

    • Rvalue References: Allows you to distinguish between lvalues and rvalues.

    • Concurrency: Standardizes support for multithreading with features like std::thread and std::mutex.

    • Standard Library Enhancements: Including new containers like std::array, regular expressions support, and more.

  2. C++14 (2014):

    • Generic Lambdas: Lambdas with auto parameters.

    • Return Type Deduction: The compiler can deduce the return type of functions.

    • Binary Literals and Digit Separators: Enhances readability.

    • Variable Templates: Templates for variables, not just functions or classes.

    • std::make_unique: Complements std::make_shared.

  3. C++17 (2017):

    • Structured Bindings: Easier decomposition of objects.

    • std::optional: Represents optional values.

    • std::variant: Represents a type-safe union.

    • Parallel Algorithms: Standard library support for parallelism.

    • Filesystem Library: std::filesystem for filesystem operations.

    • if constexpr: Compile-time conditional statements.

    • Fold Expressions: Simplifies variadic template code.

  4. C++20 (2020):

    • Concepts: Introduces concepts for template type constraints.

    • Ranges: Range-based algorithms and views.

    • Coroutines: Support for asynchronous code.

    • Three-Way Comparisons: Simplifies operator overloads.

    • Modules: Replaces traditional header files with modules.

    • Improved Standard Library: Including new features in various library components.

  5. C++23 (Expected):

    • Proposals Under Consideration: Concepts will be further integrated. Likely additions include numeric formatting, more library enhancements, and more.

Last updated 1 year ago