2025-04-01から1ヶ月間の記事一覧
c++のメンバへのポインタの使い方をまとめます 利用例 たとえば以下のデータ構造について struct Employee { int id; std::string name; double salary; }; std::vector<Employee> employees; std::sort()で Employee::id をキーにソートしたい場合を考えますこの場合</employee>…
c++の可変長テンプレートで2つの型リストKeysとValuesを使いたいとする その場合は リストの片方は std::tupleで一つの型にする 残りのリストは 可変長テンプレートにする とコーディングしやすい 例 template <typename KeyTuple, typename... Values_> struct Foo { using Keys = KeyTuple; using </typename>…
mac の TeX環境を texlive2025 (BasicTeX) に更新したので手順をまとめます.この記事は以下のエントリをTex Live 2025 に合わせて更新・加筆したものです. https://pyopyopyo.hatenablog.com/entry/2022/04/06/211116 (TeX Live 2022の記事) http://d.hate…