Skip to content

Commit 901f660

Browse files
committed
Update C++ standard to C++20
Closes #6945
1 parent b8fbe6e commit 901f660

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cmake/CompilerFlags.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function(set_default_compile_options target)
175175
ON
176176
# C++ standard
177177
CXX_STANDARD
178-
17
178+
20
179179
# pic
180180
POSITION_INDEPENDENT_CODE
181181
ON

source/core/slang-io.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ String Path::getRelativePath(String base, String path)
752752
auto result = std::filesystem::relative(p2, p1, ec);
753753
if (ec)
754754
return path;
755-
return String(UnownedStringSlice(result.generic_u8string().c_str()));
755+
return String(reinterpret_cast<const char*>(result.generic_u8string().c_str()));
756756
}
757757

758758
SlangResult Path::remove(const String& path)

tools/slang-test/slang-test-main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern "C"
5858

5959
extern "C"
6060
{
61-
__declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\";
61+
__declspec(dllexport) extern const char* D3D12SDKPath = ".\\D3D12\\";
6262
}
6363
#endif
6464

tools/test-server/test-server-main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern "C"
2828

2929
extern "C"
3030
{
31-
__declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\";
31+
__declspec(dllexport) extern const char* D3D12SDKPath = ".\\D3D12\\";
3232
}
3333
#endif
3434

0 commit comments

Comments
 (0)