DPC++ Runtime
Runtime libraries for oneAPI DPC++
iostream_proxy.hpp
Go to the documentation of this file.
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <istream> // for ostream, istream
12 
13 // Hotfix to account for the different namespaces in libstdc++ and libc++
14 #ifdef _LIBCPP_BEGIN_NAMESPACE_STD
15 _LIBCPP_BEGIN_NAMESPACE_STD
16 #else
17 namespace std {
18 #endif
19 
20 #if defined(_MSC_VER) && defined(_MT) && defined(_DLL)
21 #define __SYCL_EXTERN_STREAM_ATTRS __declspec(dllimport)
22 #else
23 #define __SYCL_EXTERN_STREAM_ATTRS
24 #endif // defined(_MT) && defined(_DLL)
25 
27 extern __SYCL_EXTERN_STREAM_ATTRS istream cin;
29 extern __SYCL_EXTERN_STREAM_ATTRS ostream cout;
31 extern __SYCL_EXTERN_STREAM_ATTRS ostream cerr;
33 extern __SYCL_EXTERN_STREAM_ATTRS ostream clog;
34 #undef __SYCL_EXTERN_STREAM_ATTRS
35 
36 #ifdef _LIBCPP_END_NAMESPACE_STD
37 _LIBCPP_END_NAMESPACE_STD
38 #else
39 } // namespace std
40 #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.