JustasMasiulis / xorstr

heavily vectorized c++17 compile time string encryption.
Apache License 2.0
1.19k stars 193 forks source link

Compile warnings/errors #25

Closed BullyWiiPlaza closed 4 years ago

BullyWiiPlaza commented 4 years ago

I'm using gcc 9.2.1 on Ubuntu but your code does not compile. Firstly, there are 2 warnings and lastly there is 1 error. Any tips or plans on fixing this?

/bin/vcpkg/installed/x64-linux/include/xorstr.hpp:225:28: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
  225 |         XORSTR_FORCEINLINE const_pointer get() const noexcept
      |                            ^~~~~~~~~~~~~
/bin/vcpkg/installed/x64-linux/include/xorstr.hpp:230:28: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
  230 |         XORSTR_FORCEINLINE const_pointer crypt_get() noexcept
      |                            ^~~~~~~~~~~~~

/bin/vcpkg/installed/x64-linux/include/xorstr.hpp:227:20: error: reinterpret_cast from type ‘const uint64_t*’ {aka ‘const long unsigned int*’} to type ‘const_pointer’ {aka ‘char*’} casts away qualifiers
  227 |             return reinterpret_cast<const_pointer>(_storage);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JustasMasiulis commented 4 years ago

Will take a look tomorrow. Kind of a deja vu moment right now as looking at the code I thought that this was fixed some time ago. :man_shrugging:

JustasMasiulis commented 4 years ago

should be fixed now

BullyWiiPlaza commented 4 years ago

@JustasMasiulis Great, it's fixed. Thanks for your quick action. :)