Open sirinath opened 3 years ago
What do you mean? They are initialized when the object is created.
I mean you can have a constructor to explicitly initialise the values.
That sounds reasonable, but it also creates another set of problems.
I like the terseness of just writing return{ br.u % 2 != 0 }
(b/c the names of these classes are horribly long), but at the same time do not want to make these classes to be implicitly convertible from bool
.
Another alternative might be to use return-type deduction to reduce the number of times I have to write the class name.
But honestly, is it that big problem?
No. This is not a big problem but takes a while to understand. The problem is that one do no know if the fields get mutated some where else and if so where. Maybe they can be just made consts.
Ah, const
sounds reasonable, though it feels like having a const
member variable (especially for (essentially) raw C-style structs like these) is a bit unconventional. I'll think of that.
Following variables do not seam to be explicitly initialised:
is_closed
,is_left_closed
in bothpolicy.h
files.