diff --git a/include/boost/spirit/x4/auxiliary/attr.hpp b/include/boost/spirit/x4/auxiliary/attr.hpp index 4b50d36dd..be0606605 100644 --- a/include/boost/spirit/x4/auxiliary/attr.hpp +++ b/include/boost/spirit/x4/auxiliary/attr.hpp @@ -121,7 +121,7 @@ struct attr_gen namespace parsers { -inline constexpr detail::attr_gen attr{}; +[[maybe_unused]] inline constexpr detail::attr_gen attr{}; } // parsers diff --git a/include/boost/spirit/x4/auxiliary/eoi.hpp b/include/boost/spirit/x4/auxiliary/eoi.hpp index 559f0e696..2ff0d5468 100644 --- a/include/boost/spirit/x4/auxiliary/eoi.hpp +++ b/include/boost/spirit/x4/auxiliary/eoi.hpp @@ -46,7 +46,7 @@ struct get_info namespace parsers { -inline constexpr eoi_parser eoi{}; +[[maybe_unused]] inline constexpr eoi_parser eoi{}; } // parsers diff --git a/include/boost/spirit/x4/auxiliary/eol.hpp b/include/boost/spirit/x4/auxiliary/eol.hpp index 69f358669..8bed22794 100644 --- a/include/boost/spirit/x4/auxiliary/eol.hpp +++ b/include/boost/spirit/x4/auxiliary/eol.hpp @@ -58,7 +58,7 @@ struct get_info namespace parsers { -inline constexpr eol_parser eol{}; +[[maybe_unused]] inline constexpr eol_parser eol{}; } // parsers diff --git a/include/boost/spirit/x4/binary.hpp b/include/boost/spirit/x4/binary.hpp index b89444b3c..de49e0223 100644 --- a/include/boost/spirit/x4/binary.hpp +++ b/include/boost/spirit/x4/binary.hpp @@ -115,7 +115,7 @@ struct any_binary_parser : parser> #define BOOST_SPIRIT_X4_BINARY_PARSER(name, endiantype, attrtype, bits) \ namespace parsers { \ - inline constexpr any_binary_parser name{}; \ + [[maybe_unused]] inline constexpr any_binary_parser name{}; \ } /* parsers */ \ using parsers::name; diff --git a/include/boost/spirit/x4/char/char.hpp b/include/boost/spirit/x4/char/char.hpp index 5cfbf3c82..807a9d5b1 100644 --- a/include/boost/spirit/x4/char/char.hpp +++ b/include/boost/spirit/x4/char/char.hpp @@ -27,7 +27,7 @@ namespace boost::spirit::x4 { namespace standard { -inline constexpr any_char char_{}; +[[maybe_unused]] inline constexpr any_char char_{}; inline namespace helpers { @@ -55,14 +55,16 @@ constexpr void lit(traits::CharIncompatibleWith auto) = delete; // Mixing } // standard -inline constexpr auto const& char_ = standard::char_; // TODO: this can't overload other character types + +[[maybe_unused]] inline constexpr auto const& char_ = standard::char_; // TODO: this can't overload other character types + using standard::helpers::lit; #ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE namespace standard_wide { -inline constexpr any_char char_{}; +[[maybe_unused]] inline constexpr any_char char_{}; inline namespace helpers { @@ -92,7 +94,7 @@ using standard_wide::helpers::lit; #ifdef BOOST_SPIRIT_X4_UNICODE namespace unicode { -inline constexpr any_char char_{}; +[[maybe_unused]] inline constexpr any_char char_{}; inline namespace helpers { diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp b/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp index eedb9a222..bf3deddb8 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp +++ b/include/boost/spirit/x4/char_encoding/unicode/detail/category_table.hpp @@ -12,7 +12,7 @@ namespace boost::spirit::x4::unicode::detail { -inline constexpr std::uint8_t category_stage1[] = { +[[maybe_unused]] inline constexpr std::uint8_t category_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 34, 42, 43, 44, 45, 46, @@ -287,7 +287,7 @@ inline constexpr std::uint8_t category_stage1[] = { 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 158 }; -inline constexpr std::uint16_t category_stage2[] = { +[[maybe_unused]] inline constexpr std::uint16_t category_stage2[] = { // block 0 32, 32, 32, 32, 32, 32, 32, 32, 32, 544, 544, 544, 544, 544, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp b/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp index 9e2c48aa7..7b3a64ed6 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp +++ b/include/boost/spirit/x4/char_encoding/unicode/detail/lowercase_table.hpp @@ -12,7 +12,7 @@ namespace boost::spirit::x4::unicode::detail { -inline constexpr std::uint8_t lowercase_stage1[] = { +[[maybe_unused]] inline constexpr std::uint8_t lowercase_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 9, 6, 10, 11, 6, 12, 6, 6, 13, 6, 6, 6, 6, 6, 6, 6, 14, 6, 6, 6, @@ -287,7 +287,7 @@ inline constexpr std::uint8_t lowercase_stage1[] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }; -inline constexpr std::uint32_t lowercase_stage2[] = { +[[maybe_unused]] inline constexpr std::uint32_t lowercase_stage2[] = { // block 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp b/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp index c608d2b47..2654f70e5 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp +++ b/include/boost/spirit/x4/char_encoding/unicode/detail/script_table.hpp @@ -12,7 +12,7 @@ namespace boost::spirit::x4::unicode::detail { -inline constexpr std::uint8_t script_stage1[] = { +[[maybe_unused]] inline constexpr std::uint8_t script_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1, 29, 30, 31, 32, 32, 33, 32, 32, 32, 34, 32, 32, 35, 36, 37, 38, 39, @@ -287,7 +287,7 @@ inline constexpr std::uint8_t script_stage1[] = { 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56 }; -inline constexpr std::uint8_t script_stage2[] = { +[[maybe_unused]] inline constexpr std::uint8_t script_stage2[] = { // block 0 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, diff --git a/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp b/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp index 47ff890da..45904c420 100644 --- a/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp +++ b/include/boost/spirit/x4/char_encoding/unicode/detail/uppercase_table.hpp @@ -12,7 +12,7 @@ namespace boost::spirit::x4::unicode::detail { -inline constexpr std::uint8_t uppercase_stage1[] = { +[[maybe_unused]] inline constexpr std::uint8_t uppercase_stage1[] = { 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 9, 10, 11, 12, 6, 13, 6, 6, 14, 6, 6, 6, 6, 6, 6, 6, 15, 16, 6, 6, @@ -287,7 +287,7 @@ inline constexpr std::uint8_t uppercase_stage1[] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }; -inline constexpr std::uint32_t uppercase_stage2[] = { +[[maybe_unused]] inline constexpr std::uint32_t uppercase_stage2[] = { // block 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/include/boost/spirit/x4/core/action_context.hpp b/include/boost/spirit/x4/core/action_context.hpp index babfe8e56..07aa343ac 100644 --- a/include/boost/spirit/x4/core/action_context.hpp +++ b/include/boost/spirit/x4/core/action_context.hpp @@ -118,11 +118,11 @@ struct _attr_fn inline namespace cpos { -inline constexpr detail::_pass_fn _pass{}; -inline constexpr detail::_val_fn _val{}; -inline constexpr detail::_as_val_fn _as_val{}; -inline constexpr detail::_where_fn _where{}; -inline constexpr detail::_attr_fn _attr{}; +[[maybe_unused]] inline constexpr detail::_pass_fn _pass{}; +[[maybe_unused]] inline constexpr detail::_val_fn _val{}; +[[maybe_unused]] inline constexpr detail::_as_val_fn _as_val{}; +[[maybe_unused]] inline constexpr detail::_where_fn _where{}; +[[maybe_unused]] inline constexpr detail::_attr_fn _attr{}; } // cpos diff --git a/include/boost/spirit/x4/core/parser.hpp b/include/boost/spirit/x4/core/parser.hpp index b8e6e72d8..624764aef 100644 --- a/include/boost/spirit/x4/core/parser.hpp +++ b/include/boost/spirit/x4/core/parser.hpp @@ -252,7 +252,7 @@ struct as_parser_fn inline namespace cpos { -inline constexpr detail::as_parser_fn as_parser{}; +[[maybe_unused]] inline constexpr detail::as_parser_fn as_parser{}; } // cpos @@ -511,7 +511,7 @@ struct what_fn inline namespace cpos { -inline constexpr detail::what_fn what{}; // no ADL +[[maybe_unused]] inline constexpr detail::what_fn what{}; // no ADL } // cpos diff --git a/include/boost/spirit/x4/core/unused.hpp b/include/boost/spirit/x4/core/unused.hpp index f55ca34c2..2592e6a4c 100644 --- a/include/boost/spirit/x4/core/unused.hpp +++ b/include/boost/spirit/x4/core/unused.hpp @@ -45,8 +45,8 @@ struct unused_container_type inline namespace cpos { -inline constexpr unused_type unused{}; -inline constexpr unused_container_type unused_container{}; +[[maybe_unused]] inline constexpr unused_type unused{}; +[[maybe_unused]] inline constexpr unused_container_type unused_container{}; } // cpos diff --git a/include/boost/spirit/x4/directive/as.hpp b/include/boost/spirit/x4/directive/as.hpp index 5e02f251b..e38968059 100644 --- a/include/boost/spirit/x4/directive/as.hpp +++ b/include/boost/spirit/x4/directive/as.hpp @@ -139,7 +139,7 @@ struct as_fn namespace parsers::directive { template -inline constexpr detail::as_fn as{}; +[[maybe_unused]] inline constexpr detail::as_fn as{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/expect.hpp b/include/boost/spirit/x4/directive/expect.hpp index 380132244..df462ba5e 100644 --- a/include/boost/spirit/x4/directive/expect.hpp +++ b/include/boost/spirit/x4/directive/expect.hpp @@ -64,7 +64,7 @@ struct expect_gen namespace parsers::directive { -inline constexpr detail::expect_gen expect{}; +[[maybe_unused]] inline constexpr detail::expect_gen expect{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/lexeme.hpp b/include/boost/spirit/x4/directive/lexeme.hpp index 92044dda0..543a242fa 100644 --- a/include/boost/spirit/x4/directive/lexeme.hpp +++ b/include/boost/spirit/x4/directive/lexeme.hpp @@ -81,7 +81,7 @@ struct lexeme_gen namespace parsers::directive { -inline constexpr detail::lexeme_gen lexeme{}; +[[maybe_unused]] inline constexpr detail::lexeme_gen lexeme{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/matches.hpp b/include/boost/spirit/x4/directive/matches.hpp index 2e87880d8..7f2afc85b 100644 --- a/include/boost/spirit/x4/directive/matches.hpp +++ b/include/boost/spirit/x4/directive/matches.hpp @@ -65,7 +65,7 @@ struct matches_gen namespace parsers::directive { -inline constexpr detail::matches_gen matches{}; +[[maybe_unused]] inline constexpr detail::matches_gen matches{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/no_case.hpp b/include/boost/spirit/x4/directive/no_case.hpp index 64f436972..db4ad11aa 100644 --- a/include/boost/spirit/x4/directive/no_case.hpp +++ b/include/boost/spirit/x4/directive/no_case.hpp @@ -63,7 +63,7 @@ struct no_case_gen namespace parsers::directive { -inline constexpr detail::no_case_gen no_case{}; +[[maybe_unused]] inline constexpr detail::no_case_gen no_case{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/no_skip.hpp b/include/boost/spirit/x4/directive/no_skip.hpp index 7347cdd21..b933a3361 100644 --- a/include/boost/spirit/x4/directive/no_skip.hpp +++ b/include/boost/spirit/x4/directive/no_skip.hpp @@ -88,7 +88,7 @@ struct no_skip_gen namespace parsers::directive { -inline constexpr detail::no_skip_gen no_skip{}; +[[maybe_unused]] inline constexpr detail::no_skip_gen no_skip{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/raw.hpp b/include/boost/spirit/x4/directive/raw.hpp index fd3694e1e..359ebbf10 100644 --- a/include/boost/spirit/x4/directive/raw.hpp +++ b/include/boost/spirit/x4/directive/raw.hpp @@ -81,7 +81,7 @@ struct raw_gen namespace parsers::directive { -inline constexpr detail::raw_gen raw{}; +[[maybe_unused]] inline constexpr detail::raw_gen raw{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/repeat.hpp b/include/boost/spirit/x4/directive/repeat.hpp index 11e79e631..68ec405b1 100644 --- a/include/boost/spirit/x4/directive/repeat.hpp +++ b/include/boost/spirit/x4/directive/repeat.hpp @@ -74,11 +74,11 @@ concept RepeatBounds = requires(std::remove_cvref_t const& bounds) { inline namespace cpos { // Infinite loop tag type -[[deprecated("Use `x4::repeat_inf`")]] +[[maybe_unused, deprecated("Use `x4::repeat_inf`")]] inline constexpr detail::repeat_inf_type inf{}; // Infinite loop tag type -inline constexpr detail::repeat_inf_type repeat_inf{}; +[[maybe_unused]] inline constexpr detail::repeat_inf_type repeat_inf{}; } // cpos @@ -188,7 +188,7 @@ struct repeat_gen namespace parsers::directive { -inline constexpr detail::repeat_gen repeat{}; +[[maybe_unused]] inline constexpr detail::repeat_gen repeat{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/seek.hpp b/include/boost/spirit/x4/directive/seek.hpp index b3d2a29dd..2d2b4b3c7 100644 --- a/include/boost/spirit/x4/directive/seek.hpp +++ b/include/boost/spirit/x4/directive/seek.hpp @@ -65,7 +65,7 @@ struct seek_gen namespace parsers::directive { -inline constexpr detail::seek_gen seek{}; +[[maybe_unused]] inline constexpr detail::seek_gen seek{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/skip.hpp b/include/boost/spirit/x4/directive/skip.hpp index 7f964f96d..f64a58001 100644 --- a/include/boost/spirit/x4/directive/skip.hpp +++ b/include/boost/spirit/x4/directive/skip.hpp @@ -179,8 +179,8 @@ struct reskip_gen namespace parsers::directive { -inline constexpr detail::skip_gen skip{}; -inline constexpr detail::reskip_gen reskip{}; +[[maybe_unused]] inline constexpr detail::skip_gen skip{}; +[[maybe_unused]] inline constexpr detail::reskip_gen reskip{}; } // parsers::directive diff --git a/include/boost/spirit/x4/directive/with.hpp b/include/boost/spirit/x4/directive/with.hpp index 73db51d2b..1d0bd3166 100644 --- a/include/boost/spirit/x4/directive/with.hpp +++ b/include/boost/spirit/x4/directive/with.hpp @@ -215,7 +215,7 @@ namespace parsers::directive { // `with` directive injects a value into the context prior to parsing. // Holds lvalue references by reference, holds rvalue reference by value. template -inline constexpr detail::with_fn with{}; +[[maybe_unused]] inline constexpr detail::with_fn with{}; } // parsers::directive diff --git a/include/boost/spirit/x4/numeric/bool.hpp b/include/boost/spirit/x4/numeric/bool.hpp index 327c36437..eb6e1d288 100644 --- a/include/boost/spirit/x4/numeric/bool.hpp +++ b/include/boost/spirit/x4/numeric/bool.hpp @@ -190,9 +190,9 @@ struct literal_bool_parser : parser> namespace standard { -inline constexpr bool_parser bool_{}; -inline constexpr literal_bool_parser true_{true}; -inline constexpr literal_bool_parser false_{false}; +[[maybe_unused]] inline constexpr bool_parser bool_{}; +[[maybe_unused]] inline constexpr literal_bool_parser true_{true}; +[[maybe_unused]] inline constexpr literal_bool_parser false_{false}; } // standard @@ -207,9 +207,9 @@ using x4::standard::false_; #ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE namespace standard_wide { -inline constexpr bool_parser bool_{}; -inline constexpr literal_bool_parser true_{true}; -inline constexpr literal_bool_parser false_{false}; +[[maybe_unused]] inline constexpr bool_parser bool_{}; +[[maybe_unused]] inline constexpr literal_bool_parser true_{true}; +[[maybe_unused]] inline constexpr literal_bool_parser false_{false}; } // standard_wide diff --git a/include/boost/spirit/x4/numeric/int.hpp b/include/boost/spirit/x4/numeric/int.hpp index 25dcee576..6b4513a21 100644 --- a/include/boost/spirit/x4/numeric/int.hpp +++ b/include/boost/spirit/x4/numeric/int.hpp @@ -52,15 +52,15 @@ struct int_parser : parser> namespace parsers { -inline constexpr int_parser short_{}; -inline constexpr int_parser int_{}; -inline constexpr int_parser long_{}; -inline constexpr int_parser long_long{}; - -inline constexpr int_parser int8{}; -inline constexpr int_parser int16{}; -inline constexpr int_parser int32{}; -inline constexpr int_parser int64{}; +[[maybe_unused]] inline constexpr int_parser short_{}; +[[maybe_unused]] inline constexpr int_parser int_{}; +[[maybe_unused]] inline constexpr int_parser long_{}; +[[maybe_unused]] inline constexpr int_parser long_long{}; + +[[maybe_unused]] inline constexpr int_parser int8{}; +[[maybe_unused]] inline constexpr int_parser int16{}; +[[maybe_unused]] inline constexpr int_parser int32{}; +[[maybe_unused]] inline constexpr int_parser int64{}; } // parsers diff --git a/include/boost/spirit/x4/numeric/real.hpp b/include/boost/spirit/x4/numeric/real.hpp index 007facacf..a6727917a 100644 --- a/include/boost/spirit/x4/numeric/real.hpp +++ b/include/boost/spirit/x4/numeric/real.hpp @@ -254,9 +254,9 @@ struct real_parser : parser> namespace parsers { -inline constexpr real_parser float_{}; -inline constexpr real_parser double_{}; -inline constexpr real_parser long_double{}; +[[maybe_unused]] inline constexpr real_parser float_{}; +[[maybe_unused]] inline constexpr real_parser double_{}; +[[maybe_unused]] inline constexpr real_parser long_double{}; } // parsers diff --git a/include/boost/spirit/x4/numeric/uint.hpp b/include/boost/spirit/x4/numeric/uint.hpp index 89394c770..dcfb20a01 100644 --- a/include/boost/spirit/x4/numeric/uint.hpp +++ b/include/boost/spirit/x4/numeric/uint.hpp @@ -51,19 +51,19 @@ struct uint_parser : parser> namespace parsers { -inline constexpr uint_parser ushort_{}; -inline constexpr uint_parser uint_{}; -inline constexpr uint_parser ulong_{}; -inline constexpr uint_parser ulong_long{}; - -inline constexpr uint_parser uint8{}; -inline constexpr uint_parser uint16{}; -inline constexpr uint_parser uint32{}; -inline constexpr uint_parser uint64{}; - -inline constexpr uint_parser bin{}; -inline constexpr uint_parser oct{}; -inline constexpr uint_parser hex{}; +[[maybe_unused]] inline constexpr uint_parser ushort_{}; +[[maybe_unused]] inline constexpr uint_parser uint_{}; +[[maybe_unused]] inline constexpr uint_parser ulong_{}; +[[maybe_unused]] inline constexpr uint_parser ulong_long{}; + +[[maybe_unused]] inline constexpr uint_parser uint8{}; +[[maybe_unused]] inline constexpr uint_parser uint16{}; +[[maybe_unused]] inline constexpr uint_parser uint32{}; +[[maybe_unused]] inline constexpr uint_parser uint64{}; + +[[maybe_unused]] inline constexpr uint_parser bin{}; +[[maybe_unused]] inline constexpr uint_parser oct{}; +[[maybe_unused]] inline constexpr uint_parser hex{}; } // parsers diff --git a/include/boost/spirit/x4/parse.hpp b/include/boost/spirit/x4/parse.hpp index db2183359..204d3611b 100644 --- a/include/boost/spirit/x4/parse.hpp +++ b/include/boost/spirit/x4/parse.hpp @@ -382,7 +382,7 @@ struct parse_fn : parse_fn_main, parse_fn_deprecated inline namespace cpos { -inline constexpr detail::parse_fn parse{}; +[[maybe_unused]] inline constexpr detail::parse_fn parse{}; [[maybe_unused, deprecated("Use `parse(...)`. Spirit can now dispatch overloads correctly.")]] inline constexpr detail::parse_fn phrase_parse{}; diff --git a/include/boost/spirit/x4/string/case_compare.hpp b/include/boost/spirit/x4/string/case_compare.hpp index a9dc59039..f8b598b43 100644 --- a/include/boost/spirit/x4/string/case_compare.hpp +++ b/include/boost/spirit/x4/string/case_compare.hpp @@ -114,7 +114,7 @@ struct case_compare_tag }; struct case_compare_no_case_t {}; -inline constexpr case_compare_no_case_t case_compare_no_case{}; +[[maybe_unused]] inline constexpr case_compare_no_case_t case_compare_no_case{}; } // detail diff --git a/include/boost/spirit/x4/traits/container_traits.hpp b/include/boost/spirit/x4/traits/container_traits.hpp index 44579bb13..8707e7a99 100644 --- a/include/boost/spirit/x4/traits/container_traits.hpp +++ b/include/boost/spirit/x4/traits/container_traits.hpp @@ -179,7 +179,7 @@ struct push_back_fn inline namespace cpos { -inline constexpr detail::push_back_fn push_back{}; +[[maybe_unused]] inline constexpr detail::push_back_fn push_back{}; } // cpos @@ -238,7 +238,7 @@ struct append_fn inline namespace cpos { -inline constexpr detail::append_fn append{}; +[[maybe_unused]] inline constexpr detail::append_fn append{}; } // cpos @@ -283,7 +283,7 @@ struct clear_fn inline namespace cpos { -inline constexpr detail::clear_fn clear{}; +[[maybe_unused]] inline constexpr detail::clear_fn clear{}; } // cpos @@ -326,7 +326,7 @@ struct is_empty_fn inline namespace cpos { -inline constexpr detail::is_empty_fn is_empty{}; +[[maybe_unused]] inline constexpr detail::is_empty_fn is_empty{}; } // cpos @@ -368,7 +368,7 @@ struct begin_fn inline namespace cpos { -inline constexpr detail::begin_fn begin{}; +[[maybe_unused]] inline constexpr detail::begin_fn begin{}; } // cpos @@ -409,7 +409,7 @@ struct end_fn inline namespace cpos { -inline constexpr detail::end_fn end{}; +[[maybe_unused]] inline constexpr detail::end_fn end{}; } // cpos diff --git a/test/x4/test.hpp b/test/x4/test.hpp index fdcb8b5fc..1b389ea9a 100644 --- a/test/x4/test.hpp +++ b/test/x4/test.hpp @@ -121,7 +121,7 @@ struct parse_overloads : x4::detail::parse_fn_main inline namespace cpos { -inline constexpr detail::parse_overloads parse{}; +[[maybe_unused]] inline constexpr detail::parse_overloads parse{}; } // cpos diff --git a/workbench/unicode/create_tables.cpp b/workbench/unicode/create_tables.cpp index 84f57eae8..8ed0f32cb 100644 --- a/workbench/unicode/create_tables.cpp +++ b/workbench/unicode/create_tables.cpp @@ -591,7 +591,7 @@ void print_file(Out& out, Builder& builder, int field_width, char const* name) out << "\n" - << " inline constexpr std::uint8_t " << name << "_stage1[] = {\n" + << " [[maybe_unused]] inline constexpr std::uint8_t " << name << "_stage1[] = {\n" << "\n" ; @@ -603,7 +603,7 @@ void print_file(Out& out, Builder& builder, int field_width, char const* name) << " };" << "\n" << "\n" - << " inline constexpr " << int_name << ' ' << name << "_stage2[] = {" + << " [[maybe_unused]] inline constexpr " << int_name << ' ' << name << "_stage2[] = {" ; int block_n = 0;