Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Idiomatic modern C++: RAII, smart pointers, move semantics, value semantics, STL algorithms, and safe concurrency. Use when writing, reviewing, or structuring C++ code.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Modern C++ (17/20/23) is a language of zero-cost abstractions and strict ownership: RAII ties resource lifetime to scope, smart pointers make ownership explicit, move semantics eliminate needless copies, and the STL algorithms express intent better than hand loops. Professional C++ means writing for correctness first (the compiler and sanitizers as allies), using the modern toolbox instead of C-with-classes habits, and reserving cleverness for measured hotspots.
The through-line: own resources explicitly, prefer the standard library, and let tools (sanitizers, static analysis) catch what humans miss.
new/delete in application code, something's off.unique_ptr = sole ownership (the default); shared_ptr
= shared ownership (use sparingly — shared ownership is shared responsibility); weak_ptr breaks
cycles. Raw pointers/references = non-owning observation. make_unique/make_shared always.std::move) when
transferring ownership out. Understand the rule of 0/3/5: if you manage a resource, define (or
delete) copy/move/destructor consistently — or better, let a smart pointer member do it (rule of 0).std::transform, find_if, accumulate, ranges (views::filter | views::transform) — named algorithms state intent; raw loops hide bugs. Ranges (C++20) compose
lazily and read like pipelines.noexcept. const member functions, const& parameters you don't
mutate — the compiler then enforces your contracts. noexcept where failure is impossible
(moves, swaps) enables optimizations and documents guarantees.std::thread, mutex/lock_guard (never manual
lock/unlock), atomic for lock-free counters/flags, jthread (C++20, auto-joining) over
thread. Share immutable data freely; synchronize mutable sharing — and prefer message passing
or task parallelism over fine-grained locking.-Wall -Wextra -Werror), and presets for debug/release/sanitizer builds.unique_ptr<T> param = takes
ownership; T& = mutates; const T& = reads; T return by value (RVO/move make it cheap).vector default — not list), <algorithm>, <chrono>,
<filesystem>, <format>/fmt over printf/iostream formatting. Don't reimplement.new/delete, no C-style casts (reinterpret_cast needs justification),
lifetime of references/pointers captured in lambdas and async work.Idiomatic snippets:
// RAII + unique_ptr: ownership is visible in the signature
std::unique_ptr<Config> loadConfig(const std::filesystem::path& path); // takes nothing, returns ownership
// Ranges pipeline instead of a hand loop
auto adults = users
| std::views::filter([](const User& u) { return u.age >= 18; })
| std::views::transform([](const User& u) { return u.name; });
// lock_guard: never manual lock/unlock
{
std::lock_guard lock(mutex_);
queue_.push(std::move(item));
} // unlocked here, even on exception
new/delete in modern code — leaks on exception paths,
double-frees, and ownership ambiguity. Smart pointers or values, always.string_view outliving its string. Lifetime issues are C++'s sharpest edge —
sanitizers + careful API design are the guards.reinterpret_cast casualness. Bypassing the type system silently.
static_cast/dynamic_cast deliberately; reinterpret_cast only with documented justification.register-era thinking, manual loop unrolling, avoiding
vector for imagined overhead. Profile first; the STL and the optimizer are better at this
than you are.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
中文简介正在准备中。当前显示原文说明。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
中文简介正在准备中。当前显示原文说明。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
中文简介正在准备中。当前显示原文说明。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
中文简介正在准备中。当前显示原文说明。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
中文简介正在准备中。当前显示原文说明。