Squashed 'third_party/optional/' content from commit 1baad184f

Change-Id: I9b2473a84dcf6d9892f1f7a9fd21b340796b6ff5
git-subtree-dir: third_party/optional
git-subtree-split: 1baad184f022a3a7502db094a984a86adedf9626
diff --git a/tests/nullopt.cpp b/tests/nullopt.cpp
new file mode 100644
index 0000000..6340724
--- /dev/null
+++ b/tests/nullopt.cpp
@@ -0,0 +1,16 @@
+#include "catch.hpp"
+#include "optional.hpp"
+
+TEST_CASE("Nullopt", "[nullopt]") {
+  tl::optional<int> o1 = tl::nullopt;
+  tl::optional<int> o2{tl::nullopt};
+  tl::optional<int> o3(tl::nullopt);
+  tl::optional<int> o4 = {tl::nullopt};
+
+  REQUIRE(!o1);
+  REQUIRE(!o2);
+  REQUIRE(!o3);
+  REQUIRE(!o4);
+
+  REQUIRE(!std::is_default_constructible<tl::nullopt_t>::value);
+}