Namespaces
Variants
Views
Actions

Template talk:cpp/container/begin

From cppreference.com

[edit] Separate the examples out into their own subpages?

Pros:

  • Template:cpp/container/begin would be lightweight in source code (by just transcluding the examples, not embedding them).
  • An example could be previewed without specified {{1}}.
  • An example could be reused elsewhere.

Radix (talk) 23:03, 18 May 2020 (PDT)

It's high time, to say the least. :)
Sometimes the page-sharing is a reasonable solution but apparently not in this case - containers are too diverse in their parametrization, initialization, and accessing/changing their 1st element by {{{1}}}::begin().
Though right now only std::span (?) is left w/o Example, in the future more containers can be promoted to the standard.
--- Space Mission (talk) 09:34, 19 May 2020 (PDT)
I'm sorry, I can't catch your meaning. Does "page-sharing" refer to the multiple examples sharing a single page, or a single example page being transcluded into different articles? Specifically, do you agree that it would be beneficial to replace all the examples on Template:cpp/container/begin with transclusions to subpages with them? (I'm willing to do the work, given there's consensus on the subject.) — Radix (talk) 13:43, 19 May 2020 (PDT)
IMO it would be much more convenient if the examples are split into teir appropriate subpages. So, yes, I agree with you. [+] --Space Mission (talk) 23:13, 19 May 2020 (PDT)
Done. — Radix (talk) 15:04, 20 May 2020 (PDT)