Modernes C++ programmieren

Okt 23, 2024

lst-0041-godb.cpp

//#(execute) c++; compiler:g132; options:-O3 -std=c++23; libs:-
// https://godbolt.org/z/GbbcnYbqv 
std::vector vec { 1, 2, 3 };        // statt vector<int>
std::tuple tpl { 5, 'x' };          // statt tuple<int,char>
std::shared_ptr<int> ptr { new int(5) };
std::shared_ptr ptr2 { ptr };       // statt shared_ptr<int>