2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

Address TODO about BOOST_PARSER_ASSERT vs. BOOST_PARSER_DEBUG_ASSERT in

quoted_string_parser.
This commit is contained in:
Zach Laine
2024-03-23 16:51:17 -05:00
parent 744fd1bdc0
commit f461b38850

View File

@@ -7010,9 +7010,7 @@ namespace boost { namespace parser {
#endif
constexpr quoted_string_parser(R && r) : chs_((R &&) r), ch_(0)
{
// TODO: This becomes ill-formed when
// BOOST_PARSER_NO_RUNTIME_ASSERTIONS is turned on.
BOOST_PARSER_ASSERT(r.begin() != r.end());
BOOST_PARSER_DEBUG_ASSERT(r.begin() != r.end());
}
#if BOOST_PARSER_USE_CONCEPTS
@@ -7026,7 +7024,7 @@ namespace boost { namespace parser {
constexpr quoted_string_parser(R && r, Escapes escapes) :
chs_((R &&) r), escapes_(escapes), ch_(0)
{
BOOST_PARSER_ASSERT(r.begin() != r.end());
BOOST_PARSER_DEBUG_ASSERT(r.begin() != r.end());
}
constexpr quoted_string_parser(char32_t cp) : chs_(), ch_(cp) {}