From 78efa932fb42289904fe542cfc152978397ae37c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 15 Dec 2020 11:39:36 +0100 Subject: Fixing cpp07/ex00 with const& & and type only, Added more test in main for cpp07 --- cpp07/ex00/whatever.hpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'cpp07/ex00/whatever.hpp') diff --git a/cpp07/ex00/whatever.hpp b/cpp07/ex00/whatever.hpp index 8768a44..53953f8 100644 --- a/cpp07/ex00/whatever.hpp +++ b/cpp07/ex00/whatever.hpp @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 19:46:56 by charles #+# #+# */ -/* Updated: 2020/12/14 15:05:32 by cacharle ### ########.fr */ +/* Updated: 2020/12/15 11:08:51 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,4 +33,27 @@ T& max(T& a, T& b) return a > b ? a : b; } +class NotAnInt +{ +public: + NotAnInt(); + NotAnInt(int n); + NotAnInt(NotAnInt const& other); + NotAnInt& operator=(NotAnInt const& other); + + bool operator==(NotAnInt const& other) const; + bool operator!=(NotAnInt const& other) const; + bool operator>(NotAnInt const& other) const; + bool operator<(NotAnInt const& other) const; + bool operator>=(NotAnInt const& other) const; + bool operator<=(NotAnInt const& other) const; + + int getN() const; + +private: + int m_n; +}; + +std::ostream& operator<<(std::ostream& out, NotAnInt const& n); + #endif -- cgit