wren
Vulkan-based game engine
Loading...
Searching...
No Matches
boost_test.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <ostream>
4#include <type_traits>
5
6#include "enums.hpp"
7
8template <typename T>
9 requires std::is_enum_v<T>
10auto boost_test_print_type(std::ostream& ostr, const T& right)
11 -> std::ostream& {
12 ostr << wren::utils::enum_to_string(right);
13 return ostr;
14}
15
16#define SETUP_PRINT_IN_NAMESPACE(ns) \
17 namespace ns { \
18 template <Describable T> \
19 auto operator<<(std::ostream& os, const T& t) -> std::ostream& { \
20 os << std::format("{}", t); \
21 return os; \
22 } \
23 }
auto boost_test_print_type(std::ostream &ostr, const T &right) -> std::ostream &
Definition boost_test.hpp:10
auto enum_to_string(E e) -> std::string
Definition enums.hpp:12