File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ tag_invoke(
198
198
199
199
struct id
200
200
{
201
- static constexpr auto & id1 = " Id#1" ;
202
- static constexpr auto & id2 = " Id#2" ;
201
+ static constexpr char const * id1 = " Id#1" ;
202
+ static constexpr char const * id2 = " Id#2" ;
203
203
204
204
std::size_t n;
205
205
};
@@ -232,9 +232,9 @@ struct id_string_repr
232
232
233
233
id_string_repr (boost::json::string_view sv)
234
234
{
235
- if ( std::equal ( sv. begin (), sv. end (), id::id1) )
235
+ if ( sv == boost::json::string_view ( id::id1, 4 ) )
236
236
n = 1 ;
237
- else if ( std::equal ( sv. begin (), sv. end (), id::id2) )
237
+ else if ( sv == boost::json::string_view ( id::id2, 4 ) )
238
238
n = 2 ;
239
239
else
240
240
throw std::runtime_error ( " unknown id" );
@@ -249,8 +249,8 @@ struct id_string_repr
249
249
{
250
250
switch (n)
251
251
{
252
- case 1 : return boost::json::string_view (id::id1);
253
- case 2 : return boost::json::string_view (id::id2);
252
+ case 1 : return boost::json::string_view (id::id1, 4 );
253
+ case 2 : return boost::json::string_view (id::id2, 4 );
254
254
default : return boost::json::string_view (" unknown" );
255
255
}
256
256
}
You can’t perform that action at this time.
0 commit comments