-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
containers: fixed templates for MSVC compiler compliancy #282
Conversation
Failure on travis build depends on a problem on clang compiler on usage of EnableArgsInitType in template (missing typename). The problem is clang only: code compiles fine on gnu gcc (4.8, 7.3, 9.3) and msvc-vs 2019. Need to investigate more. |
5611d37
to
0ac4838
Compare
squashed abovementioned commits after successfull CI. |
MSVC was not able to digest some varyadically templated methods that used std::enable_if directive to trigger SFINAE. Mismatch in overloading was reported. Current solution works on gnu-gcc (4.8, 9.3), llvm-clang(7.0,10.0), and VS2019-msvc cl
The usage of T in declaration of method's arguments triggers an error since MSVC does not resolve T=value_t=<pod specified by the class> in instantiation. In this context, T is used just as a dummy to trigger SFINAE, so it's safe to use directly original class value_t as method argument.
…ass methods According to Visual Studio 2022 documentation (see Compiler Error C2668), "if, in the same class, you have a regular member function and a templated member function with the same signature, the templated one must come first. This limitation remains in the current implementation of Visual C++."
0ac4838
to
6e3fe5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine.
I've updated a couple of comments and renamed EnableArgsInitType to EnableIfHasInitialize.
The following pull adjusts nomenclature of some templates methods to achieve compliancy with MSVC cl compiler. They do not fix errors in the gnu context, they simply reword methods in an alternative way.
Main mods involve the PiercedStorage/PiercedVector classes (see commits description).
Additionally, rewording on some preprocessor macro was needed (see commit description)