-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminlog.hpp
More file actions
28 lines (22 loc) · 769 Bytes
/
minlog.hpp
File metadata and controls
28 lines (22 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* @brief A Minimalist Logger for C++17.
* MinLog is a collection of printf-like functions for logging.
* Every log function appends a newline at the end of the string passed as an argument.
* @file MinLog.hpp
* @author Tommaso Bonvicini <tommasobonvicini@gmail.com> https://github.com/MuAlphaOmegaEpsilon/minlog
* @date 17-02-2019
*/
#ifndef MINLOG_HPP
#define MINLOG_HPP
#include <stdio.h>
template<typename... Args>
constexpr void LOG (const char * fmt, Args... args) noexcept
{
constexpr int percentSignsIndices [sizeof...(args)];
for (auto i : sizeof...(args))
percentSignsIndices [i] = -1;
#pragma message("Number of parameters:")
#pragma message(sizeof...(args))
printf ("PRINTF VERSION WITH %d PARAMETERS\n", sizeof...(args));
}
#endif