aboutsummaryrefslogtreecommitdiff
path: root/cpp07/ex00/whatever.hpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-12-15 11:39:36 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-12-15 11:39:36 +0100
commit78efa932fb42289904fe542cfc152978397ae37c (patch)
tree6878dc28e015f570aa6951f1d781115551d03997 /cpp07/ex00/whatever.hpp
parent1de596dd9242b677d6b47b51db98ce98feb95465 (diff)
downloadpiscine_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.hpp25
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