| 79 | @return The loaded data and the time it took to save the data */ |
| 80 | template <class T> |
| 81 | std::pair<T, std::chrono::nanoseconds> |
| 82 | loadData( std::ostringstream const & dataStream, std::function<void(std::istringstream &, T &)> loadFunction ) |
| 83 | { |
| 84 | T data; |
| 85 | std::istringstream os( dataStream.str() ); |
| 86 | |
| 87 | auto start = std::chrono::high_resolution_clock::now(); |
| 88 | loadFunction( os, data ); |
| 89 | |
| 90 | return {data, std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now() - start )}; |
| 91 | } |
| 92 | |
| 93 | struct cerealBinary |
| 94 | { |
nothing calls this directly
no outgoing calls
no test coverage detected