blob: 155153e7b521744ce8873aeed8943b2dd31b5f7a (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
* File: print.hpp
* Purpose: OCL Print library
* Author: Amlal El Mahrouss. (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license
*/
#ifndef __OCL_CORE_IO
#define __OCL_CORE_IO
#include <ocl/detail/config.hpp>
#ifndef __OCL_FREESTANDING
#define console_io_out std::cout
#define console_io_in std::cin
#include <iostream>
#else
#define console_io_out ::ocl::io::void_cout
#define console_io_in ::ocl::io::void_cin
#warning The OCL doesnt define IO streams in a freestanding host.
namespace ocl::io
{
class void_stream final
{
void_stream() = default;
~void_stream() = default;
void_stream& operator<<(...) = delete;
void_stream& operator>>(...) = delete;
}
inline void_stream void_cout;
inline void_stream void_cin;
} // namespace ocl::io
#endif
#endif
|