Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 521 Bytes

File metadata and controls

23 lines (18 loc) · 521 Bytes

maybe-const

  • [meta exposition-only]
  • ranges[meta header]
  • type-alias[meta id-type]
  • cpp23[meta cpp]
namespace std::ranges {
  template<bool Const, class T>
  using maybe-const = conditional_t<Const, const T, T>;
}

概要

maybe-const<Const, T> は、bool値Consttrueのとき const TfalseのときTとなる説明専用の型エイリアスである。

バージョン

言語

  • C++23

参照