rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
634 stars 116 forks source link

[Bug]: Could not deduce template argument for 'Input' #128

Closed kenkit closed 1 year ago

kenkit commented 1 year ago

bit7z version

4.0.x RC

Compilation options

BIT7Z_USE_NATIVE_STRING

7-zip version

v21.06

7-zip shared library used

7z.dll / 7z.so

Compilers

MSVC

Compiler versions

MSVC 2022

Architecture

x86

Operating system

Windows

Operating system versions

Windows 10

Bug description

My code

Steps to reproduce

    bit7z::Bit7zLibrary lib2{sevenz_dll_path};
    bit7z::BitCompressor compressor(lib2, bit7z::BitFormat::SevenZip);

Expected behavior

This is after updating from older version of the library.

Relevant compilation output

: error C2641: cannot deduce template arguments for 'bit7z::BitCompressor' 
error C2783: 'bit7z::BitCompressor<Input> bit7z:
:BitCompressor(const bit7z::Bit7zLibrary &,const bit7z::BitInOutFormat &)': 
could not deduce template argument for 'Input'

Code of Conduct

rikyoz commented 1 year ago

Hi!

Steps to reproduce

    bit7z::Bit7zLibrary lib2{sevenz_dll_path};
    bit7z::BitCompressor compressor(lib2, bit7z::BitFormat::SevenZip);

Expected behavior

This is after updating from older version of the library.

Yeah, in the v4, the old BitCompressor has been renamed to BitFileCompressor, while BitCompressor is now a template class for all the compressor classes. I've done this to improve the code reuse among all these classes.

I just now realized that I forgot to mention this change in the README and in the release changelog, I'll fix them asap! I'm sorry for the inconvenience!

kenkit commented 1 year ago

Alright I look forward to the fix

kenkit commented 1 year ago

Thnks closing this as fixed.