diff --git a/source/adios2/toolkit/transport/file/FileFStream.cpp b/source/adios2/toolkit/transport/file/FileFStream.cpp index 2ccdd931af..c26e90b148 100644 --- a/source/adios2/toolkit/transport/file/FileFStream.cpp +++ b/source/adios2/toolkit/transport/file/FileFStream.cpp @@ -14,6 +14,10 @@ #include // std::ios_base::failure /// \endcond +#if __cplusplus >= 201703L +#include +#endif + namespace adios2 { namespace transport @@ -354,10 +358,6 @@ void FileFStream::Seek(const size_t start) } } -#if __cplusplus >= 201703L -#include -#endif - void FileFStream::Truncate(const size_t length) { #if __cplusplus >= 201703L @@ -365,8 +365,9 @@ void FileFStream::Truncate(const size_t length) WaitForOpen(); std::filesystem::path p(m_Name); std::filesystem::resize_file(p, static_cast(length)); - CheckFile("couldn't move to offset " + std::to_string(start) + " of file " + - m_Name + ", in call to fstream seekp"); + // TODO: variable start has not been defined... + // CheckFile("couldn't move to offset " + std::to_string(start) + " of file + // " + m_Name + ", in call to fstream seekp"); #else // Trunation is not supported in a portable manner pre C++17 #endif