14 #include <boost/algorithm/string/predicate.hpp>
16 #include <boost/range/algorithm/copy.hpp>
17 #include <boost/range/begin.hpp>
18 #include <boost/range/end.hpp>
19 #include <boost/shared_array.hpp>
24 template <
class Range>
28 using ConstIterator =
typename Range::const_iterator;
29 using String =
typename Range::value_type;
30 using Char =
typename String::value_type;
31 using OStringStream = std::basic_ostringstream<Char>;
36 ConstIterator it = boost::const_begin(args);
37 ConstIterator end = boost::const_end(args);
42 for (; it != end; ++it)
46 os << static_cast<Char>(
'"') << *it << static_cast<Char>(
'"');
52 os << static_cast<Char>(
' ');
55 cmd_line_.reset(
new Char[
s.size() + 1]);
57 cmd_line_[
s.size()] = 0;
61 cmd_line_.reset(
new Char[1]());
65 template <
class WindowsExecutor>
69 e.cmd_line = cmd_line_.get();
70 if (!e.exe && !exe_.empty())
77 boost::shared_array<Char> cmd_line_;
81 template <
class Range>