From e6845eff5e0f21faa27e031aa0833a2c2b80ebba Mon Sep 17 00:00:00 2001 From: Sanjay Muthu Date: Fri, 17 Jan 2025 20:06:56 +0530 Subject: [PATCH] Update ex7_53.h Made any() a const member function --- ch07/ex7_53.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch07/ex7_53.h b/ch07/ex7_53.h index 313033dc..1f0d6367 100644 --- a/ch07/ex7_53.h +++ b/ch07/ex7_53.h @@ -13,7 +13,7 @@ class Debug { public: constexpr Debug(bool b = true) : rt(b), io(b), other(b) {} constexpr Debug(bool r, bool i, bool o) : rt(r), io(i), other(0) {} - constexpr bool any() { return rt || io || other; } + constexpr bool any() const { return rt || io || other; } void set_rt(bool b) { rt = b; } void set_io(bool b) { io = b; }