executing a string

Is their a method for meta programming in c++? If there is not a direct method to allow the execution of a string, is there a way around it?

sort of:
1
2
std::string s = "std::cout << \"test\";";
eval(s);

where it would execute the string as code?
Last edited on
Meta programming in C+ is being done with templates or constexpr functions. There is no such a possibility as eval( std::string( "Some code" ) ) in C++.
Last edited on
Topic archived. No new replies allowed.