MCPcopy Create free account
hub / github.com/davisking/dlib / test_make_optional

Function test_make_optional

dlib/test/optional.cpp:436–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434// ---------------------------------------------------------------------------------------------------
435
436 void test_make_optional()
437 {
438 constexpr auto o1 = dlib::make_optional(1);
439 static_assert(std::is_same<std::decay_t<decltype(o1)>, dlib::optional<int>>::value, "bad");
440 static_assert(o1 == 1, "bad");
441 static_assert(1 == o1, "bad");
442 }
443
444 class optional_tester : public tester
445 {

Callers 1

perform_testMethod · 0.85

Calls 1

make_optionalFunction · 0.85

Tested by

no test coverage detected