Skip to content
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

Wrong code for MSVC #298

Closed
andriish opened this issue Apr 9, 2024 · 1 comment
Closed

Wrong code for MSVC #298

andriish opened this issue Apr 9, 2024 · 1 comment

Comments

@andriish
Copy link
Contributor

andriish commented Apr 9, 2024

In some cases binder will generate code that is not compatible with MSVC, e.g.

using _binder_ret_0 = class std::map<std::string, std::string >;

The following code is will not compile in MSVC:

#include <stdexcept>
#include <string>
#include <map>
using _binder_ret_0 = class std::map<std::string, std::string >;
int main()
{
    _binder_ret_0 a;
    a["a"]="a";
    return 0;
}

but is OK for GCC.

To make the code compatible one should remove the "class" word.

using _binder_ret_0 = std::map<std::string, std::string >;
@lyskov
Copy link
Member

lyskov commented May 3, 2024

resolved in #299

@lyskov lyskov closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants