Skip to content

Commit 584ea9f

Browse files
committed
operator bool in captures is now explicit
1 parent c49b292 commit 584ea9f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

include/ctre/return_type.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ template <size_t Id, typename Name = void> struct captured_content {
6666
return _end;
6767
}
6868

69-
// TODO explicit
70-
constexpr CTRE_FORCE_INLINE operator bool() const noexcept {
69+
constexpr explicit CTRE_FORCE_INLINE operator bool() const noexcept {
7170
return _matched;
7271
}
7372

single-header/ctre-unicode.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3303,8 +3303,7 @@ template <size_t Id, typename Name = void> struct captured_content {
33033303
return _end;
33043304
}
33053305

3306-
// TODO explicit
3307-
constexpr CTRE_FORCE_INLINE operator bool() const noexcept {
3306+
constexpr explicit CTRE_FORCE_INLINE operator bool() const noexcept {
33083307
return _matched;
33093308
}
33103309

single-header/ctre.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,8 +3300,7 @@ template <size_t Id, typename Name = void> struct captured_content {
33003300
return _end;
33013301
}
33023302

3303-
// TODO explicit
3304-
constexpr CTRE_FORCE_INLINE operator bool() const noexcept {
3303+
constexpr explicit CTRE_FORCE_INLINE operator bool() const noexcept {
33053304
return _matched;
33063305
}
33073306

0 commit comments

Comments
 (0)