title: Is it possible to create a function dynamically, during runtime in C++?
body: <p>C++ is a static, compiled language, templates are resolved during compile time and so on...</p>
  
  <p>But is it possible to create a function during runtime, that is not described in the source code and has not been converted to machine language during compilation, so that a user can throw at it data that has not been anticipated in the source?</p>
  
  <p>I am aware this cannot happen in a straightforward way, but surely it must be possible, there are plenty of programing languages that are not compiled and create that sort of stuff dynamically that are implemented in either C or C++.</p>
  
  <p>Maybe if factories for all primitive types are created, along with suitable data structures to organize them into more complex objects such as user types and functions, this is achievable?</p>
  
  <p>Any info on the subject as well as pointers to online materials are welcome. Thanks!</p>
  
  <p>EDIT: I am aware it is possible, it is more like I am interested in implementation details :)</p>