diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-20 13:19:49 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-26 15:29:51 +0200 |
commit | eac178a2dea0857d91838b54844e74285b5957c6 (patch) | |
tree | b5b69799a0c85610e6e0c8f36f52dec11a5919e0 /tests | |
parent | 0b69165d4c681e645b6b44dec29cefeaae6849d9 (diff) |
Vector of optional movable-only elements
Diffstat (limited to 'tests')
-rw-r--r-- | tests/optional/driver.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/optional/driver.cxx b/tests/optional/driver.cxx index 5dd8964..e63c985 100644 --- a/tests/optional/driver.cxx +++ b/tests/optional/driver.cxx @@ -20,7 +20,6 @@ import butl.optional; #endif using namespace std; -using namespace butl; struct redirect { @@ -33,22 +32,12 @@ struct redirect redirect& operator= (const redirect&) = delete; }; -struct command -{ - butl::optional<redirect> err; -}; - int main () { - /*( - command c; - vector<command> cs; - cs.emplace_back (move (c)); -// cs.push_back (move (c)); -*/ - - redirect r; - vector<redirect> rs; + using butl::optional; + + optional<redirect> r; + vector<optional<redirect>> rs; rs.emplace_back (move (r)); } |