From f461b38850efb7adbdcc0ad61ef1c832a114e802 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 23 Mar 2024 16:51:17 -0500 Subject: [PATCH] Address TODO about BOOST_PARSER_ASSERT vs. BOOST_PARSER_DEBUG_ASSERT in quoted_string_parser. --- include/boost/parser/parser.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/parser/parser.hpp b/include/boost/parser/parser.hpp index 39131f07..0f3c67b6 100644 --- a/include/boost/parser/parser.hpp +++ b/include/boost/parser/parser.hpp @@ -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) {}