std::experi..._tagged_pair(3)
okay so welcome to the std::experi..._tagged_pair(3) page from the C++ Standard Libary manual π
this one is short and cute, but every detail still matters, bestie.
πΈ NAME πΈ
std::experimental::ranges::make_tagged_pair β std::experimental::ranges::make_tagged_pair
Yes, it literally says it twice. Iconic behavior. π
β¨ Synopsis β¨
Defined in header <experimental/ranges/utility>.
template< TagSpecifier Tag1, TagSpecifier Tag2, class T1, class T2 >
constexpr ranges::tagged</*see below*/, Tag1, Tag2> make_tagged_pair(
(ranges TS)
T1&& x, T2&& y );
So this is the ranges TS situation, and it's the convenience function for creating a tagged pair. It deduces the element types from the arguments, but the tag specifiers must be explicitly specified β no sneaky auto-deduction for those, iykyk. π¦
The /*see below*/ part of the return type is literally:
decltype(std::make_pair(std::forward<T1>(x), std::forward<T2>(y)))
That's the whole "see below" mystery. Slay. π₯
π Return value π
It returns R(std::forward<T1>(x), std::forward<T2>(y)), where R is the return type. That's the return-value moment, no cap. β¨
π₯ See also π₯
TaggedTypeβ specifies that a type represents a tag specifier and its element type (concept).taggedβ augument a tuple-like type with named accessors (class template).tagged_pairβ alias template for a taggedstd::pair(alias template).tagged_tupleβ alias template for a taggedstd::tuple(alias template).make_tagged_tupleβ convenience function for creating atagged_tuple(function template).in,in1,in2,out,out1,out2,fun,min,max,begin,endβ tag specifiers for use withranges::tagged(class).
π That's the page, bestie! Source/version: http://cppreference.com; date: 2024.06.10; page: std::experi..._tagged_pair(3). Bye! π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms