On some compilers value{x} invokes initializer_list constructor, on
others it is equivalent to value(x). This is very problematic, but this
isn't something we can fix. On the other hand, we CAN make init list
construction to be equivalent to value(x), if the size of init list is
one. This commit does exactly that.
This fixes a rare case when the parser first suspends inside a comment,
then is given input exactly up to the newline character. Before the fix
it proceeded to read past the end of the buffer or hit an assert.
Specifically, when user invokes throwing value_to, when it goes to
non-throwing conversion, then back to throwing conversion, exceptions
will be able to propogate still.
Right now, sentinel() casts the `basic_parser` pointer (`this`) to
`const char *`, but that pointer is not unique if the input buffer
happens to be placed right before the `basic_parser_impl` instance -
the end of that buffer then has the same address as `basic_parser`.
Example code:
```
struct {
char buffer[8]{"{\"12345\""};
boost::json::stream_parser p;
} s;
s.p.write(s.buffer, sizeof(s.buffer));
s.p.write(":0}", 3);
```
This stops parsing at the end of the buffer, and then the
`incomplete()` check in `parse_string()` will return true; the second
`write()` call will crash with assertion failure:
> boost/json/basic_parser_impl.hpp:1016: const char* boost::json::basic_parser<Handler>::parse_unescaped(const char*, std::integral_constant<bool, StackEmpty_>, std::integral_constant<bool, AllowComments_>, bool) [with bool StackEmpty_ = true; bool IsKey_ = true; Handler = boost::json::detail::handler]: Assertion `*cs == '\x22'' failed.
This changes `sentinel()` by adding 1 to guaranteed that the sentinel
pointer is unique even if the input buffers borders on this object.