template <constexpr-param R>
constexpr auto operator=(R y) const noexcept;
概要
constant_wrapperが保持する値に、別のconstant_wrapperが保持する値を代入する。
戻り値
constant_wrapper<(value = R::value)>{}を返す。
備考
constant_wrapperが保持するvalueはconstであるため、value = R::valueという代入式は不適格となる。- したがって、このオーバーロードは宣言されているものの、
constant_wrapperに対してはオーバーロード解決に参加せず、使用できない。
バージョン
言語
- C++26
処理系
- Clang: 23 ✅
- GCC: 16.1 ✅
- Visual C++: 2026 Update 2 ❌