diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-12-15 11:39:36 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-12-15 11:39:36 +0100 |
| commit | 78efa932fb42289904fe542cfc152978397ae37c (patch) | |
| tree | 6878dc28e015f570aa6951f1d781115551d03997 /cpp07/ex00/whatever.hpp | |
| parent | 1de596dd9242b677d6b47b51db98ce98feb95465 (diff) | |
| download | piscine_cpp-78efa932fb42289904fe542cfc152978397ae37c.tar.gz piscine_cpp-78efa932fb42289904fe542cfc152978397ae37c.tar.bz2 piscine_cpp-78efa932fb42289904fe542cfc152978397ae37c.zip | |
Fixing cpp07/ex00 with const& & and type only, Added more test in main for cpp07
Diffstat (limited to 'cpp07/ex00/whatever.hpp')
| -rw-r--r-- | cpp07/ex00/whatever.hpp | 25 |
1 files changed, 24 insertions, 1 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 |
