MCPcopy Create free account
hub / github.com/Apress/beginning-rust-2e / main

Function main

Source Code/22-13.cpp:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <iostream>
4#include <memory>
5int main() {
6 auto i1 = std::unique_ptr<short> {
7 new short(12345)
8 };
9 const auto i2 = std::unique_ptr<short> {
10 new short(*i1)
11 };
12 const auto i3 = move(i1);
13 std::cout << (bool)i1 << " " << (bool)i2 << " "
14 << (bool)i3 << " " << *i2 << " " << *i3;
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected