diff --git a/test/optional_test_tc_base.cpp b/test/optional_test_tc_base.cpp index 7c1db9b..8107f7b 100644 --- a/test/optional_test_tc_base.cpp +++ b/test/optional_test_tc_base.cpp @@ -25,6 +25,8 @@ int main() #else +#include + struct NotDefaultConstructible { NotDefaultConstructible() = delete; @@ -37,9 +39,37 @@ void test_tc_base() BOOST_TEST(boost::none == o); } +struct S +{ + +}; + +template +struct W +{ + T& t_; + + template + W(Args&&... args) + : t_(std::forward(args)...) + { + } +}; + +void test_value_init() +{ + { + S s; + W w{s}; + } + boost::optional > o; + BOOST_TEST(boost::none == o); +} + int main() { test_tc_base(); + test_value_init(); return boost::report_errors(); }