DPC++ Runtime
Runtime libraries for oneAPI DPC++
iostream_proxy.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <istream>
3 #include <ostream>
4 
5 // Hotfix to account for the different namespaces in libstdc++ and libc++
6 #ifdef _LIBCPP_BEGIN_NAMESPACE_STD
7 _LIBCPP_BEGIN_NAMESPACE_STD
8 #else
9 namespace std {
10 #endif
11 
12 #if defined(_MT) && defined(_DLL)
13 #define __SYCL_EXTERN_STREAM_ATTRS __declspec(dllimport)
14 #else
15 #define __SYCL_EXTERN_STREAM_ATTRS
16 #endif // defined(_MT) && defined(_DLL)
17 
19 extern __SYCL_EXTERN_STREAM_ATTRS istream cin;
21 extern __SYCL_EXTERN_STREAM_ATTRS ostream cout;
23 extern __SYCL_EXTERN_STREAM_ATTRS ostream cerr;
25 extern __SYCL_EXTERN_STREAM_ATTRS ostream clog;
26 #undef __SYCL_EXTERN_STREAM_ATTRS
27 
28 #ifdef _LIBCPP_END_NAMESPACE_STD
29 _LIBCPP_END_NAMESPACE_STD
30 #else
31 } // namespace std
32 #endif
#define __SYCL_EXTERN_STREAM_ATTRS
__SYCL_EXTERN_STREAM_ATTRS ostream cout
Linked to standard output.
__SYCL_EXTERN_STREAM_ATTRS ostream clog
Linked to standard error (buffered)
__SYCL_EXTERN_STREAM_ATTRS ostream cerr
Linked to standard error (unbuffered)
__SYCL_EXTERN_STREAM_ATTRS istream cin
Linked to standard input.