yohhoyの日記

技術的メモをしていきたい日記

2021-07-01から1ヶ月間の記事一覧

ジュラシック・パーク in C++ Standard

C++

プログラミング言語C++標準規格に潜む恐竜たち。C++20(N4861) D.5 Deprecated volatile typesより引用。*1 1 Postfix ++ and -- expressions (7.6.1.5) and prefix ++ and -- expressions (7.6.2.2) of volatile-qualified arithmetic and pointer types are…

RangeとViewとconst修飾

C++

C++20 RangesライブラリのRangeとViewとconst修飾の関係についてメモ。まとめ: 対象Rangeのconst修飾(要素の変更可否)と、Viewのconst修飾(const-iterableの可否)は異なる概念である。 C++20標準ライブラリ提供の一部Rangeアダプタでは、const修飾によ…