std::indirectly_writable(3cxx)
β¨ NAME β¨
std::indirectly_writable β the vibe check for whether you can actually write a value into the thing an iterator points at π
π¦ SYNOPSIS π¦
#include <iterator>
π Concept definition
template<typename _Out, typename _Tp>
concept std::indirectly_writable = requires(_Out&& __o, _Tp&& __t)
{
*__o = std::forward<_Tp>(__t);
*std::forward<_Out>(__o) = std::forward<_Tp>(__t);
const_cast<const iter_reference_t<_Out>&&>(*__o)
= std::forward<_Tp>(__t);
const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o))
= std::forward<_Tp>(__t);
}
π DESCRIPTION π
okay so bestie, here's the whole entire point of this concept: it's the requirements for writing a value into an iterator's referenced object. That's it. That's the assignment. π«
Like, if you're sitting there with an _Out and a _Tp and you're wondering "can I just slam this value into whatever that iterator is pointing at?" β this is the concept that answers that for you. No cap. π«Ά
πΈ Detailed Description πΈ
Requirements for writing a value into an iterator's referenced object. π¦
ngl it's giving very "short and sweet" energy, but that's because the concept definition up there does ALL the heavy lifting. Every single one of those requires expressions has to hold for the concept to be satisfied β all four of them, no skipping. π₯
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code. π€β¨
and that's the whole page, bestie β no notes, iconic, periodt π πΈ
mwah π β this lil rewrite lives in the libstdc++ manual, brought to you by the fine folks at std::indirectly_writable(3cxx). go write into some iterators responsibly, k? π
π¦ where this page comes from
- ubuntu resolute: libstdc++-13-doc 13.4.0-10ubuntu1
- ubuntu resolute: libstdc++-16-doc 16-20260322-1ubuntu1
- ubuntu stonking: libstdc++-13-doc 13.5.0-1ubuntu1
- ubuntu stonking: libstdc++-16-doc 16.2.0-3ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms