JustasMasiulis / xorstr

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

Error #41

Closed MCAki06 closed 3 years ago

MCAki06 commented 3 years ago

These are all the errors for me:

Somebody can help me please?

JustasMasiulis commented 3 years ago

What compiler did you use?

A code snippet that causes this would also help.

MCAki06 commented 3 years ago

I'm using Visual Studio 2019

Line 139 alignas(alignment) std::uint64_t keys[]{ JM_XORSTR_LOAD_FROM_REG(Keys)... };

Line 182 alignas(alignment) std::uint64_t keys[]{ JM_XORSTR_LOAD_FROM_REG(Keys)... };

Line 208 (3 errors here) xor_string(L l, std::integral_constant<std::size_t, Size>, std::index_sequence<Indices...>) -> xor_string< std::remove_const_t<std::remove_reference_t<decltype(l()[0])>>, Size, std::integer_sequence<std::uint64_t, detail::key8<Indices>()...>, std::index_sequence<Indices...>>;

P.S.: Thanks for the fast reply.

JustasMasiulis commented 3 years ago

VS 2019 is supposed to work I think. Did you enable c++17 or c++latest?

Did a quick test on godbolt and didn't seem like there are problems, so it would be really nice if you could provide a minimal reproduction / what the code that causes this looks like.

MCAki06 commented 3 years ago

Well, now I set it to C++ latest, and most of the errors are gone only just the 'parameter pack "Keys" was referenced but not expanded' still here.

JustasMasiulis commented 3 years ago

Yeah. That doesn't really tell much. I need a small example of how you cause this.

JustasMasiulis commented 3 years ago

For me on VS 2019 Preview everything seems to compile fine.

    std::cout << xorstr_("test") << xorstr_("long test for AVX intrinsics to trigger");
    std::wcout << xorstr_(L"wide test") << xorstr_("wide and long test for AVX intrinsics to trigger");
MCAki06 commented 3 years ago

Yeah. That doesn't really tell much. I need a small example of how you cause this.

image bruh

MCAki06 commented 3 years ago

I mean i'm getting this but i don't know why whilst I'm using c++17

JustasMasiulis commented 3 years ago

Once again. This does not tell anything.

First of all that is the errors window in Visual Studio, which is useless. They could mean literally nothing and be caused by another problem in your code, or even not exist at all if it's an error only intellisense sees. If you want errors that help - look at the output window instead.

I have been telling you that I need a minimal repro. I can't fix this if you just show me the errors without showing the code.

MCAki06 commented 3 years ago

Well, now it's working. VS just needed a restart 😂 Thanks for the help & fast replies!