Doesn't compile with VC14 #5
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
need more info
need verification for fix
not so hard
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-tplgy/cppcodec#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I get this error just including base64_default_rfc4648.hpp:
Error C2535 'void cppcodec::detail::base64::pad(Result &,ResultState &,std::enable_if<,size_t>::type)': member function already defined or declared
line 137 base64.hpp
Thanks for the report. It seems like the
enable_iffor thepad()function doesn't work in VC14.I need the
enable_ifbecause codec variants withgenerates_padding() == falsemight not have apadding_symbol()function, so calling that frompad()would cause an error.I tried a few variants but getting SFINAE working on this stuff is tricky even without considering MSVC, so I don't have an easy fix at hand. I also lack a Windows/MSVC environment to test this, making it harder to fix.
I might look into possible alternatives on the weekend. Would be neat if VC14 handled this without errors.
Please try the master branch from https://github.com/jpetso/cppcodec (my fork). It rephrases the existing SFINAE to match the current semantics, but Microsoft having fixed this issue in 2014 suggests that there's a chance it'll work.
So I haven't gotten it to work, but on latest master I've rewritten the SFINAE so it uses less
enable_if<>and that results in fewer errors. If someone can make the remaining template to work then there shouldn't be anything necessary on top of that.I believe this should be fixed in current master, since my latest commit implemented padding in a different way that doesn't use
enable_if. Needs retesting.Unfortunately, it still seems to be broken on VC14. I uploaded the build log here. I tried to fix the problem myself, but my C++ wizardry isn't that good. Trying to build "base32enc" is enough to provoke the error.
The system I tried to build on was:
Windows 10 x64
Visual Studio Community 2015
Version 14.0.25424.00 Update 3