blob: 36c7b9b3d029b4645fb00e7a2d0508177600934f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|