blob: 5dd896456b9be7bf53e487eb17e417a0b354a382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// file : tests/optional/driver.cxx -*- C++ -*-
// license : MIT; see accompanying LICENSE file
#include <cassert>
#ifndef __cpp_lib_modules_ts
#include <vector>
#include <utility> // move()
#endif
// Other includes.
#ifdef __cpp_modules_ts
#ifdef __cpp_lib_modules_ts
import std.core;
#endif
import butl.optional;
#else
#include <libbutl/optional.mxx>
#endif
using namespace std;
using namespace butl;
struct redirect
{
redirect () = default;
redirect (redirect&&) = default;
redirect& operator= (redirect&&) = default;
redirect (const redirect&) = delete;
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;
rs.emplace_back (move (r));
}
|