support file reading from string literal

This commit is contained in:
ohyzha
2024-12-27 16:49:43 +02:00
parent 3cf6d17485
commit 7200166d99
2 changed files with 27 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenVulkano
if (!file.is_open())
{
if (emptyOnMissing) return {};
if constexpr (std::is_same_v<std::remove_reference_t<std::remove_cv_t<T>>, std::filesystem::path>)
if constexpr (std::is_same_v<std::decay_t<T>, std::filesystem::path>)
{
throw std::runtime_error("Failed to open file '" + filePath.string() + "'!");
}