uni

University stuff
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README | LICENSE

commit a9dc2469187f7178003b6925d83f22f21b04877c
parent def4c1d9cf1721318fe9a0eef75eccca596e508f
Author: Christos Margiolis <christos@margiolis.net>
Date:   Wed, 20 May 2020 14:35:44 +0300

added constexpr to bool operators

Diffstat:
Massignment-2.3-operoverloading/src/student.h | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/assignment-2.3-operoverloading/src/student.h b/assignment-2.3-operoverloading/src/student.h @@ -31,12 +31,12 @@ class Student void operator+= (Course *c); Student operator= (const Student& s); - bool operator== (const Student& s) const {return this->semester == s.semester;} - bool operator!= (const Student& s) const {return this->semester != s.semester;} - bool operator< (const Student& s) const {return this->semester < s.semester;} - bool operator<= (const Student& s) const {return this->semester <= s.semester;} - bool operator> (const Student& s) const {return this->semester > s.semester;} - bool operator>= (const Student& s) const {return this->semester >= s.semester;} + constexpr bool operator== (const Student& s) const {return this->semester == s.semester;} + constexpr bool operator!= (const Student& s) const {return this->semester != s.semester;} + constexpr bool operator< (const Student& s) const {return this->semester < s.semester;} + constexpr bool operator<= (const Student& s) const {return this->semester <= s.semester;} + constexpr bool operator> (const Student& s) const {return this->semester > s.semester;} + constexpr bool operator>= (const Student& s) const {return this->semester >= s.semester;} const std::string& get_name() const; constexpr const char *get_AM() const {return this->AM;}