diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-04-02 09:15:30 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-04-02 09:15:30 +0100 |
commit | 21a147c3c1c2fad2819fe76becab320c51eb131f (patch) | |
tree | 9114123be1d9165a199d8b27af8f9b4e00333e71 /include/yage/logger.hpp | |
download | YAGE-21a147c3c1c2fad2819fe76becab320c51eb131f.tar.gz YAGE-21a147c3c1c2fad2819fe76becab320c51eb131f.zip |
Adding initial files
Diffstat (limited to 'include/yage/logger.hpp')
-rw-r--r-- | include/yage/logger.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/yage/logger.hpp b/include/yage/logger.hpp new file mode 100644 index 00000000..36c7b9b3 --- /dev/null +++ b/include/yage/logger.hpp @@ -0,0 +1,24 @@ +#ifndef LOGGER_HPP +#define LOGGER_HPP + +#include <string> + +class Logger +{ +public: + template<typename Tail> + static std::string log(std::ostream &out, Tail &&tail) + { + out<<tail; + } + + template<typename Head, typename... Tail> + static std::string log(std::ostream &out, Head &&head, Tail &&...tail) + { + out<<std::forward<Head>(head); + log(out, std::forward<Tail>(tail)...); + } +}; + + +#endif |