1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6 // Copyright (c) 2016 Klemens D. Morgenstern
8 // Distributed under the Boost Software License, Version 1.0. (See accompanying
9 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_PROCESS_EXE_HPP
12 #define BOOST_PROCESS_EXE_HPP
14 #include <boost/process/detail/basic_cmd.hpp>
16 /** \file boost/process/exe.hpp
18 * Header which provides the exe property.
23 <emphasis>unspecified</emphasis> <globalname alt="boost::process::exe">exe</globalname>;
30 namespace filesystem { class path; }
38 template<typename = void>
39 inline exe_setter_<typename boost::filesystem::path::value_type> operator()(const boost::filesystem::path & pth) const
41 return exe_setter_<typename boost::filesystem::path::value_type>(pth.native());
44 template<typename = void>
45 inline exe_setter_<typename boost::filesystem::path::value_type> operator=(const boost::filesystem::path & pth) const
47 return exe_setter_<typename boost::filesystem::path::value_type>(pth.native());
51 template<typename Char>
52 inline exe_setter_<Char> operator()(const Char *s) const
54 return exe_setter_<Char>(s);
56 template<typename Char>
57 inline exe_setter_<Char> operator= (const Char *s) const
59 return exe_setter_<Char>(s);
62 template<typename Char>
63 inline exe_setter_<Char> operator()(const std::basic_string<Char> &s) const
65 return exe_setter_<Char>(s);
67 template<typename Char>
68 inline exe_setter_<Char> operator= (const std::basic_string<Char> &s) const
70 return exe_setter_<Char>(s);
76 /** The exe property allows to explicitly set the executable.
78 The overload form applies when to the first, when several strings are passed to a launching
81 The following expressions are valid, with `value` being either a C-String or
82 a `std::basic_string` with `char` or `wchar_t` or a `boost::filesystem::path`.
89 The property can only be used for assignments.
93 constexpr boost::process::detail::exe_ exe{};