BorisSchaeling / boost-process

Boost.Process is a library to manage system processes
Boost Software License 1.0
32 stars 20 forks source link

Use Boost.Preprocessor to generate C++03 execute() overloads. #9

Open nat-goodspeed opened 8 years ago

nat-goodspeed commented 8 years ago

This pull request streamlines {posix,windows}/execute.hpp by making Boost.Preprocessor do the multiple levels of repetition, generating BOOST_PROCESS_EXECUTE_INITIALIZERS overloads of the execute() function with appropriate numbers of template parameters, formal parameters and fusion::make_tuple() parameters.

This makes the header shorter, allowing the maintainer to focus on a single instance of the execute() function. It guarantees consistency among all the generated overloads, eliminating the possibility of a typo. And it permits the library user to extend the number of initializer arguments if desired.