I have a snippet that looks like
std::string z_A_file("z_A.txt");
z_A_file = inputs_folder + z_A_file.c_str();
Eigen::Matrix<PRECISION, Eigen::Dynamic, Eigen::Dynamic> z_A_ = readArbitraryMatrix<PRECISION>(z_A_file.c_str());
Eigen::VectorXf z_A = z_A_;
//
std::string z_B_file("z_B.txt");
z_B_file = inputs_folder + z_B_file.c_str();
Eigen::Matrix<PRECISION, Eigen::Dynamic, Eigen::Dynamic> z_B_ = readArbitraryMatrix<PRECISION>(z_B_file.c_str());
Eigen::VectorXf z_B = z_B_;
Could I have a PRE-PROCESSOR function such that I just write
read_vector(A);
read_vector(B);
instead of repeating the same code ?
This file:
After preprocessing:
g++ -E main.cpp -o main.pp
Became at:
Is this what you expect?