We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e7adcb commit 59be0c4Copy full SHA for 59be0c4
test/value_from.cpp
@@ -260,8 +260,9 @@ tag_invoke(
260
261
struct id
262
{
263
- static constexpr auto& id1 = "Id#1";
264
- static constexpr auto& id2 = "Id#2";
+ // msvc 14.0 doesn't like these being references to char arrays
+ static constexpr char const* id1 = "Id#1";
265
+ static constexpr char const* id2 = "Id#2";
266
267
std::size_t n;
268
};
@@ -299,8 +300,8 @@ struct id_string_repr
299
300
301
switch(n)
302
- case 1: return boost::json::string_view(id::id1);
303
- case 2: return boost::json::string_view(id::id2);
+ case 1: return boost::json::string_view(id::id1, 4);
304
+ case 2: return boost::json::string_view(id::id2, 4);
305
default: return boost::json::string_view("unknown");
306
}
307
0 commit comments