Home
last modified time | relevance | path

Searched refs:opt1 (Results 1 – 2 of 2) sorted by relevance

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.object/optional.object.swap/
Dswap.pass.cpp72 optional<int> opt1; in main() local
74 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() local
84 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 …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.specalg/
Dswap.pass.cpp71 optional<int> opt1; in main() local
73 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() local
83 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 …]