JustasMasiulis / xorstr

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

Latest MSVC template "auto is not allowed here" #21

Closed moshater closed 5 years ago

moshater commented 5 years ago

template<auto... Cs>

MSVC complain about it.

JustasMasiulis commented 5 years ago

Have you changed language standard to c++17?

moshater commented 5 years ago

My bad, forget to check the setting. It's working now.

timoxa5651 commented 4 years ago

having same issue, but i have already set C++17 option... image image

JustasMasiulis commented 4 years ago

having same issue, but i have already set C++17 option... image image

What's the compiler output

Anton-V-K commented 4 years ago

Any chances the header may be successfully processed by a C++14 compiler (VS2015)? I was going to try it in an old project (which is built with vc140 toolset), but your classes use C++17 features (like auto in template parameters).

JustasMasiulis commented 4 years ago

@Anton-V-K

I could probably port it to c++14 or maybe even 11 l. I'll take a look tomorrow.

JustasMasiulis commented 4 years ago

@Anton-V-K Making it c++14 would require a bit too much work at the moment.

What I was able to fix or know that fixing isn't hard

What is harder to fix and I don't want to touch though is the technique of using lambda to populate variadic template of chars from a string literal. All the other approaches that I remember/had used in the past are really ugly and usually generate tons of intermediary templates.

Anton-V-K commented 4 years ago

@JustasMasiulis , thanks for looking into this. It's a pity the code can't be compiled in the c++14 mode.