Lines Matching refs:opt
40 optional<int> opt;
41 opt = 1;
42 assert(static_cast<bool>(opt) == true);
43 assert(*opt == 1);
46 optional<int> opt;
48 opt = i;
49 assert(static_cast<bool>(opt) == true);
50 assert(*opt == i);
53 optional<int> opt(3);
55 opt = i;
56 assert(static_cast<bool>(opt) == true);
57 assert(*opt == i);
60 optional<std::unique_ptr<int>> opt;
61 opt = std::unique_ptr<int>(new int(3));
62 assert(static_cast<bool>(opt) == true);
63 assert(**opt == 3);
66 optional<std::unique_ptr<int>> opt(std::unique_ptr<int>(new int(2)));
67 opt = std::unique_ptr<int>(new int(3));
68 assert(static_cast<bool>(opt) == true);
69 assert(**opt == 3);