mirror of
https://github.com/boostorg/parser.git
synced 2026-01-19 04:22:13 +00:00
fix CI clang warnings in tests
This commit is contained in:
committed by
Zach Laine
parent
6eeed0dce9
commit
5864eee3be
@@ -50,8 +50,8 @@ struct string_int_double_priv
|
||||
std::string s;
|
||||
|
||||
private:
|
||||
int i;
|
||||
double d;
|
||||
[[maybe_unused]] int i;
|
||||
[[maybe_unused]] double d;
|
||||
};
|
||||
|
||||
struct string_int_double_no_copy_move
|
||||
@@ -62,8 +62,8 @@ struct string_int_double_no_copy_move
|
||||
|
||||
private:
|
||||
std::string s;
|
||||
int i;
|
||||
double d;
|
||||
[[maybe_unused]] int i;
|
||||
[[maybe_unused]] double d;
|
||||
};
|
||||
|
||||
struct employee
|
||||
|
||||
@@ -182,7 +182,7 @@ void github_issue_78()
|
||||
|
||||
namespace issue_90 { namespace parser {
|
||||
const auto string =
|
||||
'"' >> boost::parser::lexeme[*(boost::parser::char_ - '"')] > '"';
|
||||
('"' >> boost::parser::lexeme[*(boost::parser::char_ - '"')]) > '"';
|
||||
const auto specifier = string > ':' > string;
|
||||
}}
|
||||
|
||||
|
||||
@@ -2842,10 +2842,10 @@ int main()
|
||||
};
|
||||
|
||||
namespace bp = boost::parser;
|
||||
std::variant<key_value, double> kv_or_d;
|
||||
key_value kv;
|
||||
bp::parse("42 13.0", bp::int_ >> bp::double_, kv); // Ok.
|
||||
#if 0
|
||||
std::variant<key_value, double> kv_or_d;
|
||||
bp::parse("42 13.0", bp::int_ >> bp::double_, kv_or_d); // Error: ill-formed!
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace more_about_rules_3 {
|
||||
|
||||
bp::rule<struct parens_tag> parens = "matched parentheses";
|
||||
|
||||
auto const parens_def = ('(' >> parens > ')') | bp::eps;
|
||||
auto const parens_def = (('(' >> parens) > ')') | bp::eps;
|
||||
|
||||
BOOST_PARSER_DEFINE_RULES(parens);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ namespace more_about_rules_4 {
|
||||
|
||||
bp::rule<struct parens_tag> parens = "matched parentheses";
|
||||
|
||||
auto const parens_def = ('(' >> parens > ')') | bp::eps;
|
||||
auto const parens_def = (('(' >> parens) > ')') | bp::eps;
|
||||
|
||||
BOOST_PARSER_DEFINE_RULES(parens);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user