Title
[networking.ts] Remove spurious nested value_type buffer sequence requirement
Status
c++23
Section
[buffer.reqmts]
Submitter
Vinnie Falco

Created on 2017-09-20.00:00:00 last changed 12 months ago

Messages

Date: 2018-03-18.16:03:30

Proposed resolution:

This wording is relative to N4588.

  1. Modify [buffer.reqmts.mutablebuffersequence] Table 12 "MutableBufferSequence requirements" as indicated:

    Table 12 — MutableBufferSequence requirements
    expression return type assertion/note pre/post-condition
    […]
    X u(x); post:
    equal(
      net::buffer_sequence_begin(x),
      net::buffer_sequence_end(x),
      net::buffer_sequence_begin(u),
      net::buffer_sequence_end(u),
      [](const typename X::value_type& v1mutable_buffer& b1,
         const typename X::value_type& v2mutable_buffer& b2)
        {
          mutable_buffer b1(v1);
          mutable_buffer b2(v2);
          return b1.data() == b2.data()
              && b1.size() == b2.size();
        })
    
  2. Modify [buffer.reqmts.constbuffersequence] Table 13 "ConstBufferSequence requirements" as indicated:

    Table 13 — ConstBufferSequence requirements
    expression return type assertion/note pre/post-condition
    […]
    X u(x); post:
    equal(
      net::buffer_sequence_begin(x),
      net::buffer_sequence_end(x),
      net::buffer_sequence_begin(u),
      net::buffer_sequence_end(u),
      [](const typename X::value_type& v1const_buffer& b1,
         const typename X::value_type& v2const_buffer& v2)
        {
          const_buffer b1(v1);
          const_buffer b2(v2);
          return b1.data() == b2.data()
              && b1.size() == b2.size();
        })
    
Date: 2018-03-17.00:00:00

[ 2018-3-17 Adopted in Jacksonville ]

Date: 2017-10-20.00:00:00

[ 2017-10-20 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

Date: 2017-10-15.00:00:00

[ 2017-10-19, Peter Dimov provides improved wording ]

The alternative wording prevents the need for auto parameters because it takes advantage of the "convertible to" requirement.

Date: 2017-10-19.19:23:01

Addresses: networking.ts

The post-condition requirements for ConstBufferSequence and MutableBufferSequence refer to X::value_type, but no such nested type is required. The lambda expression passed to equal can use auto const& parameter types instead.

Previous resolution: [SUPERSEDED]

This wording is relative to N4588.

  1. Modify [buffer.reqmts.mutablebuffersequence] Table 12 "MutableBufferSequence requirements" as indicated:

    Table 12 — MutableBufferSequence requirements
    expression return type assertion/note pre/post-condition
    […]
    X u(x); post:
    equal(
      net::buffer_sequence_begin(x),
      net::buffer_sequence_end(x),
      net::buffer_sequence_begin(u),
      net::buffer_sequence_end(u),
      [](const typename X::value_typeauto& v1,
         const typename X::value_typeauto& v2)
        {
          mutable_buffer b1(v1);
          mutable_buffer b2(v2);
          return b1.data() == b2.data()
              && b1.size() == b2.size();
        })
    
  2. Modify [buffer.reqmts.constbuffersequence] Table 13 "ConstBufferSequence requirements" as indicated:

    Table 13 — ConstBufferSequence requirements
    expression return type assertion/note pre/post-condition
    […]
    X u(x); post:
    equal(
      net::buffer_sequence_begin(x),
      net::buffer_sequence_end(x),
      net::buffer_sequence_begin(u),
      net::buffer_sequence_end(u),
      [](const typename X::value_typeauto& v1,
         const typename X::value_typeauto& v2)
        {
          const_buffer b1(v1);
          const_buffer b2(v2);
          return b1.data() == b2.data()
              && b1.size() == b2.size();
        })
    
History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2021-02-27 12:43:20adminsetstatus: c++20 -> wp
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2018-03-18 16:03:30adminsetmessages: + msg9744
2018-03-18 16:03:30adminsetstatus: voting -> wp
2018-02-12 01:13:49adminsetstatus: ready -> voting
2017-10-22 15:16:55adminsetmessages: + msg9485
2017-10-22 15:16:55adminsetstatus: new -> ready
2017-10-19 19:23:01adminsetmessages: + msg9482
2017-10-08 13:32:55adminsetmessages: + msg9466
2017-09-20 00:00:00admincreate