Searched refs:opt1 (Results 1 – 2 of 2) sorted by relevance
72 optional<int> opt1; in main() local74 static_assert(noexcept(opt1.swap(opt2)) == true, ""); in main()75 assert(static_cast<bool>(opt1) == false); in main()77 opt1.swap(opt2); in main()78 assert(static_cast<bool>(opt1) == false); in main()82 optional<int> opt1(1); in main() local84 static_assert(noexcept(opt1.swap(opt2)) == true, ""); in main()85 assert(static_cast<bool>(opt1) == true); in main()86 assert(*opt1 == 1); in main()88 opt1.swap(opt2); in main()[all …]
71 optional<int> opt1; in main() local73 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()74 assert(static_cast<bool>(opt1) == false); in main()76 swap(opt1, opt2); in main()77 assert(static_cast<bool>(opt1) == false); in main()81 optional<int> opt1(1); in main() local83 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()84 assert(static_cast<bool>(opt1) == true); in main()85 assert(*opt1 == 1); in main()87 swap(opt1, opt2); in main()[all …]