cppfastio / fast_io

Freestanding fast input/output for C++20
MIT License
630 stars 52 forks source link

[Bug] How to use `write` when using `win32` file handles #777

Open Smurf-IV opened 1 month ago

Smurf-IV commented 1 month ago

Visual Studio 17.10 x64 stl/std project (No MFC) The following code will not compile:

            fast_io::obuf_file outfile_str( stressFileName, fast_io::open_mode::out | fast_io::open_mode::text | fast_io::open_mode::trunc );
            fast_io::write(outfile_str,utf8bom.cbegin(),utf8bom.cend()); 

States: image

trcrsired commented 1 month ago

next branch?

Smurf-IV commented 1 month ago

I can comment on this repo no more, as I have trouble using this with linked projects that are also /clr builds. Thankyou.

trcrsired commented 1 month ago

I can comment on this repo no more, as I have trouble using this with linked projects that are also /clr builds. Thankyou.

what? clr builds? Hasn't microsoft removed CLR support?

Smurf-IV commented 1 month ago

Nope, it has been "Improved" to work correctly with the latest CRT and C++20: image

trcrsired commented 1 month ago

Nope, it has been "Improved" to work correctly with the latest CRT and C++20: image

what about next branch with ::fast_io::operations::write_all_bytes? There is no ::fast_io::write