Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/auxiliary/attr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct attr_gen

namespace parsers {

inline constexpr detail::attr_gen attr{};
[[maybe_unused]] inline constexpr detail::attr_gen attr{};

} // parsers

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/auxiliary/eoi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct get_info<eoi_parser>

namespace parsers {

inline constexpr eoi_parser eoi{};
[[maybe_unused]] inline constexpr eoi_parser eoi{};

} // parsers

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/auxiliary/eol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct get_info<eol_parser>

namespace parsers {

inline constexpr eol_parser eol{};
[[maybe_unused]] inline constexpr eol_parser eol{};

} // parsers

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct any_binary_parser : parser<any_binary_parser<T, endian, bits>>

#define BOOST_SPIRIT_X4_BINARY_PARSER(name, endiantype, attrtype, bits) \
namespace parsers { \
inline constexpr any_binary_parser<attrtype, boost::endian::order::endiantype, bits> name{}; \
[[maybe_unused]] inline constexpr any_binary_parser<attrtype, boost::endian::order::endiantype, bits> name{}; \
} /* parsers */ \
using parsers::name;

Expand Down
10 changes: 6 additions & 4 deletions include/boost/spirit/x4/char/char.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace boost::spirit::x4 {

namespace standard {

inline constexpr any_char<char_encoding::standard> char_{};
[[maybe_unused]] inline constexpr any_char<char_encoding::standard> char_{};

inline namespace helpers {

Expand Down Expand Up @@ -55,14 +55,16 @@ constexpr void lit(traits::CharIncompatibleWith<char> 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_encoding::standard_wide> char_{};
[[maybe_unused]] inline constexpr any_char<char_encoding::standard_wide> char_{};

inline namespace helpers {

Expand Down Expand Up @@ -92,7 +94,7 @@ using standard_wide::helpers::lit;
#ifdef BOOST_SPIRIT_X4_UNICODE
namespace unicode {

inline constexpr any_char<char_encoding::unicode> char_{};
[[maybe_unused]] inline constexpr any_char<char_encoding::unicode> char_{};

inline namespace helpers {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions include/boost/spirit/x4/core/action_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/boost/spirit/x4/core/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/boost/spirit/x4/core/unused.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/as.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct as_fn
namespace parsers::directive {

template<X4Attribute T>
inline constexpr detail::as_fn<T> as{};
[[maybe_unused]] inline constexpr detail::as_fn<T> as{};

} // parsers::directive

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/expect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/lexeme.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/matches.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/no_case.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/no_skip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/raw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions include/boost/spirit/x4/directive/repeat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ concept RepeatBounds = requires(std::remove_cvref_t<Bounds> 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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/seek.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/boost/spirit/x4/directive/skip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/x4/directive/with.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<class ID>
inline constexpr detail::with_fn<ID> with{};
[[maybe_unused]] inline constexpr detail::with_fn<ID> with{};

} // parsers::directive

Expand Down
12 changes: 6 additions & 6 deletions include/boost/spirit/x4/numeric/bool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ struct literal_bool_parser : parser<literal_bool_parser<T, Encoding, Policy>>

namespace standard {

inline constexpr bool_parser<bool, char_encoding::standard> bool_{};
inline constexpr literal_bool_parser<bool, char_encoding::standard> true_{true};
inline constexpr literal_bool_parser<bool, char_encoding::standard> false_{false};
[[maybe_unused]] inline constexpr bool_parser<bool, char_encoding::standard> bool_{};
[[maybe_unused]] inline constexpr literal_bool_parser<bool, char_encoding::standard> true_{true};
[[maybe_unused]] inline constexpr literal_bool_parser<bool, char_encoding::standard> false_{false};

} // standard

Expand All @@ -207,9 +207,9 @@ using x4::standard::false_;
#ifndef BOOST_SPIRIT_X4_NO_STANDARD_WIDE
namespace standard_wide {

inline constexpr bool_parser<bool, char_encoding::standard_wide> bool_{};
inline constexpr literal_bool_parser<bool, char_encoding::standard_wide> true_{true};
inline constexpr literal_bool_parser<bool, char_encoding::standard_wide> false_{false};
[[maybe_unused]] inline constexpr bool_parser<bool, char_encoding::standard_wide> bool_{};
[[maybe_unused]] inline constexpr literal_bool_parser<bool, char_encoding::standard_wide> true_{true};
[[maybe_unused]] inline constexpr literal_bool_parser<bool, char_encoding::standard_wide> false_{false};

} // standard_wide

Expand Down
18 changes: 9 additions & 9 deletions include/boost/spirit/x4/numeric/int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ struct int_parser : parser<int_parser<T, Radix, MinDigits, MaxDigits>>

namespace parsers {

inline constexpr int_parser<short> short_{};
inline constexpr int_parser<int> int_{};
inline constexpr int_parser<long> long_{};
inline constexpr int_parser<long long> long_long{};

inline constexpr int_parser<std::int8_t> int8{};
inline constexpr int_parser<std::int16_t> int16{};
inline constexpr int_parser<std::int32_t> int32{};
inline constexpr int_parser<std::int64_t> int64{};
[[maybe_unused]] inline constexpr int_parser<short> short_{};
[[maybe_unused]] inline constexpr int_parser<int> int_{};
[[maybe_unused]] inline constexpr int_parser<long> long_{};
[[maybe_unused]] inline constexpr int_parser<long long> long_long{};

[[maybe_unused]] inline constexpr int_parser<std::int8_t> int8{};
[[maybe_unused]] inline constexpr int_parser<std::int16_t> int16{};
[[maybe_unused]] inline constexpr int_parser<std::int32_t> int32{};
[[maybe_unused]] inline constexpr int_parser<std::int64_t> int64{};

} // parsers

Expand Down
6 changes: 3 additions & 3 deletions include/boost/spirit/x4/numeric/real.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ struct real_parser : parser<real_parser<T, Policy>>

namespace parsers {

inline constexpr real_parser<float> float_{};
inline constexpr real_parser<double> double_{};
inline constexpr real_parser<long double> long_double{};
[[maybe_unused]] inline constexpr real_parser<float> float_{};
[[maybe_unused]] inline constexpr real_parser<double> double_{};
[[maybe_unused]] inline constexpr real_parser<long double> long_double{};

} // parsers

Expand Down
Loading