JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
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
13namespace jngl {
14
15template <class T>
16#ifdef NDEBUG
17void debugLn(const T&) {
18#else
19[[deprecated("Use jngl::debug instead (also adds a newline)")]]
21void debugLn(const T& t) {
23 s << t << std::endl;
24 printMessage(s.str());
25#endif
26}
27
28} // namespace jngl
T endl(T... args)
JNGL's main namespace.
void printMessage(const std::string &text)
Prints text on stdout.
void debugLn(const T &t)
Definition debug.hpp:21
T str(T... args)