// file : tests/optional/driver.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file #include #ifndef __cpp_lib_modules_ts #include #include // move() #endif // Other includes. #ifdef __cpp_modules_ts #ifdef __cpp_lib_modules_ts import std.core; #endif import butl.optional; #else #include #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 err; }; int main () { /*( command c; vector cs; cs.emplace_back (move (c)); // cs.push_back (move (c)); */ redirect r; vector rs; rs.emplace_back (move (r)); }