Skip to content

Commit b3b6efe

Browse files
committed
Attempt to fixe howto11 build with C++20.
1 parent cfe96d7 commit b3b6efe

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

howtos/howto11/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ void ClientSession::handle(Msg1& msg)
143143
...
144144
KeyValuePropFrame keyValueFrame;
145145
auto& keyValuePropsData = msg.field_keyValueProps().value();
146-
auto readIter = keyValuePropsData.begin();
146+
auto readIter = keyValuePropsData.data();
147147

148148
for (auto idx = 0U; idx < msg.field_count().value(); ++idx) {
149-
auto consumed = static_cast<std::size_t>(std::distance(keyValuePropsData.begin(), readIter));
149+
auto consumed = static_cast<std::size_t>(std::distance(keyValuePropsData.data(), readIter));
150150
KeyValuePropFrame::MsgPtr propPtr;
151151
auto es = comms::processSingleWithDispatch(readIter, keyValuePropsData.size() - consumed, keyValueFrame, propPtr, *this);
152152
if (es != comms::ErrorStatus::Success) {
@@ -163,7 +163,7 @@ void ClientSession::handle(Msg2& msg)
163163
...
164164
TlvPropFrame tlvFrame;
165165
auto& tlvPropsData = msg.field_tlvProps().value();
166-
auto readIter = tlvPropsData.begin();
166+
auto readIter = tlvPropsData.data();
167167
168168
comms::processAllWithDispatch(readIter, tlvPropsData.size(), tlvFrame, *this);
169169
...

howtos/howto11/src/ClientSession.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ void ClientSession::handle(Msg1& msg)
4545

4646
KeyValuePropFrame keyValueFrame;
4747
auto& keyValuePropsData = msg.field_keyValueProps().value();
48-
auto readIter = keyValuePropsData.begin();
48+
auto readIter = keyValuePropsData.data();
4949

5050
for (auto idx = 0U; idx < msg.field_count().value(); ++idx) {
51-
auto consumed = static_cast<std::size_t>(std::distance(keyValuePropsData.begin(), readIter));
51+
auto consumed = static_cast<std::size_t>(std::distance(keyValuePropsData.data(), readIter));
5252
KeyValuePropFrame::MsgPtr propPtr;
5353
auto es = comms::processSingleWithDispatch(readIter, keyValuePropsData.size() - consumed, keyValueFrame, propPtr, *this);
5454
if (es != comms::ErrorStatus::Success) {
@@ -72,7 +72,7 @@ void ClientSession::handle(Msg2& msg)
7272

7373
TlvPropFrame tlvFrame;
7474
auto& tlvPropsData = msg.field_tlvProps().value();
75-
auto readIter = tlvPropsData.begin();
75+
auto readIter = tlvPropsData.data();
7676

7777
comms::processAllWithDispatch(readIter, tlvPropsData.size(), tlvFrame, *this);
7878
std::cout << std::endl;

0 commit comments

Comments
 (0)