AnyarInc / Ascent

A fast and flexible C++ simulation engine and differential equation solver.
Apache License 2.0
123 stars 15 forks source link

Support for variant types in the recorder #6

Closed mwalcott3 closed 4 years ago

mwalcott3 commented 4 years ago

Support for recording different types through std::variant

Sample code:

   asc::RecorderT<std::variant<std::string, int>> recorder;
   std::string a = "a";
   int b = 1;
   recorder.record(a, "a");
   recorder.record(b, "b");
   for (int i(0); i < 10; ++i) {
      a += 'a';
      b += 1;
      recorder.update();
   }
   recorder.csv("test");