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

c++ standard ignored in MSVC #180

Open
ChristosT opened this issue Apr 15, 2024 · 0 comments
Open

c++ standard ignored in MSVC #180

ChristosT opened this issue Apr 15, 2024 · 0 comments

Comments

@ChristosT
Copy link

It looks like the c++ standard is ignored if provided via the cflags when using MSVC

The example below fails in MSVC but success with gcc (10.5):

from pygccxml import parser
from pygccxml import utils

generator_path, generator_name = utils.find_xml_generator()

print(f"f{generator_path=}")
print(f"f{generator_name=}")
header="""
#include <variant>
std::variant<int, double, float> value;
"""

config = parser.xml_generator_configuration_t(
        xml_generator_path=generator_path,
        xml_generator=generator_name,
        cflags="-std=c++17",

)
parsed_declarations = parser.parse_string(
	header,
        config,
 )

Error:

C:\Users\User\AppData\Local\Temp\tmp9050xy28.h:3:6: error: no template named 'variant' in namespace 'std'
std::variant<int, double, float> value;
~~~~~^
1 error generated.

Using

castxml            0.4.5
pygccxml           2.5.0

and MSVC 19.39.33522

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

1 participant