static_assert(!std::is_abstract<Value>::value,
"Optional may not be used with abstract types");
static_assert(!std::is_abstract<Value>::value,
"Optional may not be used with abstract types");
#include <algorithm>
#include <iomanip>
#include <string>
#include <algorithm>
#include <iomanip>
#include <string>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
EXPECT_THROW(empty.value(), OptionalEmptyException);
}
EXPECT_THROW(empty.value(), OptionalEmptyException);
}
+TEST(Optional, NoThrowDefaultConstructible) {
+ EXPECT_TRUE(std::is_nothrow_default_constructible<Optional<bool>>::value);
+}
+