Skip to content

RNC-SNP/Cxx

Repository files navigation

Cxx-Snippets

Code Snippets of Code snippets of C++11, C++14, C++17.

C++11

  • auto specifier:

    Specifying that the type of the variable that is being declared will be automatically deduced from its initializer. <code>

  • constexpr:

    Specifying that the value of a variable or function can appear in constant expressions. <code>

  • std::move:

    Producing an xvalue expression that identifies its argument. <code>

  • std::atomic_flag:

    An atomic boolean type. <code>

  • std::array:

    A container that encapsulates fixed size arrays. <code>

  • std::forward_list:

    A container that supports fast insertion and removal of elements from anywhere in the container. <code>

  • std::tuple:

    A fixed-size collection of heterogeneous values. <code>

  • std::shared_ptr:

    A smart pointer that retains shared ownership of an object through a pointer. <code>

  • std::unique_ptr:

    A smart pointer that owns and manages another object through a pointer and disposes of that object when the unique_ptr goes out of scope. <code>

  • std::weak_ptr:

    A smart pointer that holds a non-owning ("weak") reference to an object that is managed by std::shared_ptr. <code>

  • Lambda expressions:

    Constructs a closure: an unnamed function object capable of capturing variables in scope. <code>

  • std::async:

    Running a function asynchronously. <code>

  • std::thread:

    A single thread of execution. <code>

  • std::mutex:

    A synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads. <code>

  • std::condition_variable:

    A synchronization primitive that can be used to block a thread, or multiple threads at the same time, until another thread both modifies a shared variable (the condition), and notifies the condition_variable. <code>

  • std::chrono::system_clock:

    The system-wide real time wall clock. <code>

C++14

  • Generic lambdas:

    Allowing lambda function parameters to be declared with the auto type specifier. <code>

  • Lambda capture expressions:

    Allowing lambda captured members to be initialized with arbitrary expressions. <code>

C++17

  • std::string_view

    A way to wrap an existing string in a NON-OWNING way, which is cheaper than std::string to constrct and copy. <code>

  • filesystem::space_info:

    Space information on the filesystem. <code>

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published