JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
jngl
debug.hpp
Go to the documentation of this file.
1
// Copyright 2012-2025 Jan Niklas Hasse <jhasse@gmail.com>
2
// For conditions of distribution and use, see copyright notice in LICENSE.txt
5
#pragma once
6
7
#ifndef NDEBUG
8
#include "
message.hpp
"
9
10
#include <
sstream
>
11
#endif
12
13
namespace
jngl
{
14
15
template
<
class
T>
16
#ifdef NDEBUG
17
void
debugLn
(
const
T&) {
18
#else
19
[[deprecated(
"Use jngl::debug instead (also adds a newline)"
)]]
21
void
debugLn
(
const
T& t) {
22
std::stringstream
s;
23
s << t <<
std::endl
;
24
printMessage
(s.
str
());
25
#endif
26
}
27
28
}
// namespace jngl
std::stringstream
std::endl
T endl(T... args)
message.hpp
jngl
JNGL's main namespace.
Definition
Achievement.hpp:10
jngl::printMessage
void printMessage(const std::string &text)
Prints text on stdout.
jngl::debugLn
void debugLn(const T &t)
Definition
debug.hpp:21
sstream
std::stringstream::str
T str(T... args)