aboutsummaryrefslogtreecommitdiff
path: root/cpp06/ex00/optional.hpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-11-08 13:39:12 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-11-08 13:39:12 +0100
commit1e9d90bdf9ef5fc05093d3449d883597c7f896de (patch)
treecc5334baec6ec10a0d99bc925499512bc44f2cd0 /cpp06/ex00/optional.hpp
parentc426fe76ec5925e8c94aae3db04e5e1f1ce1585e (diff)
downloadpiscine_cpp-1e9d90bdf9ef5fc05093d3449d883597c7f896de.tar.gz
piscine_cpp-1e9d90bdf9ef5fc05093d3449d883597c7f896de.tar.bz2
piscine_cpp-1e9d90bdf9ef5fc05093d3449d883597c7f896de.zip
Added cpp06 boilerplate
Diffstat (limited to 'cpp06/ex00/optional.hpp')
-rw-r--r--cpp06/ex00/optional.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp06/ex00/optional.hpp b/cpp06/ex00/optional.hpp
new file mode 100644
index 0000000..2c77ae3
--- /dev/null
+++ b/cpp06/ex00/optional.hpp
@@ -0,0 +1,28 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* optional.hpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/16 11:43:24 by charles #+# #+# */
+/* Updated: 2020/04/16 11:45:26 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef OPTIONAL_HPP
+# define OPTIONAL_HPP
+
+template<typename T>
+class Optional
+{
+public:
+ Optional();
+ bool hasValue() const;
+ T& getValue();
+
+private:
+ T m_value;
+};
+
+#endif