File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ tag_invoke(
198198
199199struct id
200200{
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" ;
203203
204204 std::size_t n;
205205};
@@ -232,9 +232,9 @@ struct id_string_repr
232232
233233 id_string_repr (boost::json::string_view sv)
234234 {
235- if ( std::equal ( sv. begin (), sv. end (), id::id1) )
235+ if ( sv == boost::json::string_view ( id::id1, 4 ) )
236236 n = 1 ;
237- else if ( std::equal ( sv. begin (), sv. end (), id::id2) )
237+ else if ( sv == boost::json::string_view ( id::id2, 4 ) )
238238 n = 2 ;
239239 else
240240 throw std::runtime_error ( " unknown id" );
@@ -249,8 +249,8 @@ struct id_string_repr
249249 {
250250 switch (n)
251251 {
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 );
254254 default : return boost::json::string_view (" unknown" );
255255 }
256256 }
You can’t perform that action at this time.
0 commit comments