Skip to content

Commit c8780c0

Browse files
committed
fixes pedantic error about unused variable in GCC
1 parent dbfbecb commit c8780c0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

include/ctre/atoms_characters.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ template <auto V> struct character {
4545
};
4646

4747
template <typename... Content> struct negative_set {
48-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
48+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
4949
return !(Content::match_char(value, f) || ... || false);
5050
}
5151
};
5252

5353
template <typename... Content> struct set {
54-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
54+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(C[[maybe_unused]] harT value, const flags & f) noexcept {
5555
return (Content::match_char(value, f) || ... || false);
5656
}
5757
};
5858

5959
template <auto... Cs> struct enumeration : set<character<Cs>...> { };
6060

6161
template <typename... Content> struct negate {
62-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
62+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
6363
return !(Content::match_char(value, f) || ... || false);
6464
}
6565
};

single-header/ctre-unicode.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,21 +1603,21 @@ template <auto V> struct character {
16031603
};
16041604

16051605
template <typename... Content> struct negative_set {
1606-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1606+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
16071607
return !(Content::match_char(value, f) || ... || false);
16081608
}
16091609
};
16101610

16111611
template <typename... Content> struct set {
1612-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1612+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(C[[maybe_unused]] harT value, const flags & f) noexcept {
16131613
return (Content::match_char(value, f) || ... || false);
16141614
}
16151615
};
16161616

16171617
template <auto... Cs> struct enumeration : set<character<Cs>...> { };
16181618

16191619
template <typename... Content> struct negate {
1620-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1620+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
16211621
return !(Content::match_char(value, f) || ... || false);
16221622
}
16231623
};

single-header/ctre.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,21 +1600,21 @@ template <auto V> struct character {
16001600
};
16011601

16021602
template <typename... Content> struct negative_set {
1603-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1603+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
16041604
return !(Content::match_char(value, f) || ... || false);
16051605
}
16061606
};
16071607

16081608
template <typename... Content> struct set {
1609-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1609+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(C[[maybe_unused]] harT value, const flags & f) noexcept {
16101610
return (Content::match_char(value, f) || ... || false);
16111611
}
16121612
};
16131613

16141614
template <auto... Cs> struct enumeration : set<character<Cs>...> { };
16151615

16161616
template <typename... Content> struct negate {
1617-
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char(CharT value, const flags & f) noexcept {
1617+
template <typename CharT> CTRE_FORCE_INLINE static constexpr bool match_char([[maybe_unused]] CharT value, const flags & f) noexcept {
16181618
return !(Content::match_char(value, f) || ... || false);
16191619
}
16201620
};

0 commit comments

Comments
 (0)