vtkCharConvCompatibility.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
14 #ifndef vtkCharConvCompatibility_h
15 #define vtkCharConvCompatibility_h
16 
17 #define VTK_HAS_STD_CHARS_FORMAT
18 #define VTK_HAS_STD_FROM_CHARS_RESULT
19 #define VTK_HAS_STD_TO_CHARS_RESULT
20 
21 #if !(defined(VTK_HAS_STD_CHARS_FORMAT) && defined(VTK_HAS_STD_FROM_CHARS_RESULT) && \
22  defined(VTK_HAS_STD_TO_CHARS_RESULT))
23 #include "vtkCommonCoreModule.h" // For export macro
24 #include <system_error> // For std::errc
25 namespace std
26 {
28 enum class VTKCOMMONCORE_EXPORT chars_format
29 {
30  scientific = 0x1,
31  fixed = 0x2,
32  hex = 0x4,
33  general = fixed | scientific
34 };
35 struct VTKCOMMONCORE_EXPORT from_chars_result
36 {
37  const char* ptr;
38  std::errc ec;
39 };
40 struct VTKCOMMONCORE_EXPORT to_chars_result
41 {
42  char* ptr;
43  std::errc ec;
44 };
46 }
47 #else
48 #include <charconv> // For std::chars_format, std::from_chars_result, std::to_chars_result
49 #endif
50 
51 #endif // vtkCharConvCompatibility_h
#define VTKCOMMONCORE_EXPORT
#define VTK_ABI_NAMESPACE_BEGIN