25 Ranges library [ranges]

25.5 Range utilities [range.utility]

25.5.7 Range conversions [range.utility.conv]

25.5.7.3 ranges​::​to adaptors [range.utility.conv.adaptors]

template<class C, class. Args> requires (!view<C>) constexpr auto to(Args&&. args); template<template<class.> class C, class. Args> constexpr auto to(Args&&. args);
Mandates: For the first overload, C is a cv-unqualified class type.
Returns: A range adaptor closure object ([range.adaptor.object]) f that is a perfect forwarding call wrapper ([func.require]) with the following properties:
  • It has no target object.
  • Its bound argument entities bound_args consist of objects of types decay_t<Args>. direct-non-list-initialized with std​::​forward<Args>(args)., respectively.
  • Its call pattern is to<C>(r, bound_args..), where r is the argument used in a function call expression of f.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant