Namespaces
Variants

Template talk:dcl rev begin

From cppreference.com

I think it would be useful if we could link to specific overloads, I was thinking of adding a {{#if:{{{num|}}}|id="dcl_{{{num|}}}" attribute to the tbody tag. Example: (see first and second overloads).

</tbody> <tbody class="t-dcl-rev t-dcl-rev-num" id="dcl_1">

</tbody>

<tbody class="t-dcl-rev t-dcl-rev-num" id="dcl_2">
Defined in header <numeric>
(1)
template< class InputIt, class T >
T accumulate( InputIt first, InputIt last, T init );
(until C++20)
template< class InputIt, class T >
constexpr T accumulate( InputIt first, InputIt last, T init );
(since C++20)
(2)
template< class InputIt, class T, class BinaryOperation >
T accumulate( InputIt first, InputIt last, T init,
              BinaryOperation op );
(until C++20)
template< class InputIt, class T, class BinaryOperation >
constexpr T accumulate( InputIt first, InputIt last, T init,
                        BinaryOperation op );
(since C++20)

Any objections? Would need to make the analogous change to the dcl template for the tr tag also --Ybab321 (talk) 03:28, 16 April 2020 (PDT)

  1. A row (group) with id="dcl_N" would be unique within the {{dcl begin}}--{{dcl end}}, but not necessarily so within the page. Maybe an extra qualifier should be prepended, e.g. the ID of the {{dcl begin}}--{{dcl end}} that contains the row (group).
  2. "dcl_N" is quite meaningless. I think an overload name would be more useful: instead of (or in addition to) the num parameter, a name could be provided. (Careful naming would also solve problem #1.)
Radix (talk) 17:10, 17 April 2020 (PDT)