86 cards across 4 sections
C++23
C++26
std::expected
std::mdspan
<print>
std::format
if consteval
operator[]
import std;
^^
[:...:]
pre
post
contract_assert
std::execution
std::simd
-std=c++26
auto
decltype(auto)
auto [a, b] = pair;
.first
.second
T&
T*
const
this
enum class
Color::Red
int
enum
T x{...}
T x()
std::unique_ptr<T>
std::shared_ptr<T>
shared_ptr
std::weak_ptr<T>
std::make_unique<T>(...)
std::make_shared<T>(...)
new
unique_ptr<T, Deleter>
T(T&& other)
other
std::move(x)
x
std::forward<T>(arg)
T&&
T
C++17
template<typename T> T max(T a, T b)
std::vector<T>
template<typename... Args>
...
std::tuple
concept
std::integral<T>
requires
std::pair p{1, 2.0}
<int, double>
std::vector<bool>
if constexpr (cond)
std::vector
std::array
std::deque
std::list
std::map
std::set
O(log n)
std::unordered_map
std::unordered_set
O(1)
std::string_view
std::span<T>
*it
++it
std::sort
std::find
std::accumulate
emplace_back(args...)
push_back
std::ranges
data | std::views::filter(pred) | std::views::transform(fn)
[capture](params) { body }
[&]
[=]
[](auto x) { return x + 1; }
std::function<R(Args...)>
sort(v, {}, &Person::age)
throw
catch
noexcept
std::terminate
constexpr
consteval
constinit
static_assert(cond, msg)
std::thread t(fn, args...)
join
detach
std::mutex
std::lock_guard
std::scoped_lock
std::atomic<T>
std::condition_variable
unique_lock
import
export module
add_executable
target_link_libraries
target_compile_features
std::unique_ptr<FILE, decltype(&fclose)> f(fopen("a.txt","r"), &fclose);
const T&
void print(const std::string& s) { std::cout << s;}
std::make_unique<T>()
std::make_shared<T>()
auto p = std::make_unique<Widget>(42);
template<std::integral T>T clamp_min(T v, T lo) { return v < lo ? lo : v;}
std::vector<int> make() { std::vector<int> v{1,2,3}; return v; // elided, not moved}
lock
unlock
std::scoped_lock lk(mutexA, mutexB);shared_state += 1;
std::views::filter
std::views::transform
auto evens = nums | std::views::filter([](int n){return n%2==0;}) | std::views::transform([](int n){return n*n;});
explicit
class Meters {public: explicit Meters(double v);};
-Wall -Wextra -Werror
/W4 /WX
g++ -std=c++23 -Wall -Wextra -Werror main.cpp
vec.reserve(n)
std::vector<int> v;v.reserve(1000);for (int i = 0; i < 1000; ++i) v.push_back(i);
std::optional<T>
has_value()
-1
std::optional<int> find_id(std::string_view name);
void sum(std::span<const int> data);
auto [it, inserted] = map.insert(...)
auto [it, inserted] = m.insert({key, val});if (!inserted) it->second = val;
export module math;export int square(int x) { return x*x; }
std::array<T, N>
std::array<int, 4> a{1, 2, 3, 4};
delete
unique_ptr
std::string
size() - 1
size_t
size()
mutex
lock_guard
scoped_lock
std::atomic
catch (std::exception e)
const std::exception&
vector
std::endl
'\n'
std::make_unique
std::make_shared
std::move
static_cast
dynamic_cast
const_cast
reinterpret_cast
(T)x
using
using namespace std
std::ranges::sort
for
-Wall -Wextra
/W4