Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template find_executable

boost::process::v2::environment::find_executable — Find the executable name in an environment-like type.

Synopsis

// In header: <boost/process/v2/environment.hpp>


template<typename Environment = current_view> 
  boost::process::v2::filesystem::path 
  find_executable(boost::process::v2::filesystem::path name, 
                  Environment && env = current());

Description

The environment type passed in must be a range with value T that fulfills the following requirements:

For T value

  • std::get<0>(value) must return a type comparable to key_view.

  • std::get<1>(value) must return a type convertible to value_view.

Parameters:

env

The environment to search. Defaults to the current environment of this process

Returns:

A filesystem::path to the executable or an empty path if it cannot be found.


PrevUpHomeNext