FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix template disambiguation syntax on MSVC by PerretB · Pull Request #2799 · xtensor-stack/xtensor · GitHub

Repository navigation

fix template disambiguation syntax on MSVC - #2799

Open
PerretB wants to merge 1 commit into
xtensor-stack:masterfrom
PerretB:fix_template_syntax_msvc
Open

PerretB wants to merge 1 commit into
xtensor-stack:masterfrom
PerretB:fix_template_syntax_msvc

Conversation

PerretB commented Jul 22, 2024

Copy link
Copy Markdown
Contributor

MSCV currently emits a syntax error on line (TBB with SIMD branch)

res_stepper.template store_simd(fct_stepper.template step_simd<value_type>());

Adds a simple syntax helper for MSVC (not sure what the standard says here).

res_stepper.template store_simd<>(fct_stepper.template step_simd<value_type>()); 

FIXES #2736 (note that compiling with /Zc:lambda on MSVC is currently required to avoid this compiler bug https://developercommunity.visualstudio.com/t/lambda-fails-to-implicitly-capture-constexpr-value/610504 )

Copy link
Copy Markdown
Contributor

I've been wondering how to fix this. The default lambda parser is definitely not compliant with constexpr captures. How did you know that adding <> would fix this?

PerretB commented Jul 24, 2024

Copy link
Copy Markdown
Contributor Author

I had a vague memory of having encountered a similar problem with the template keyword before, but I can't say I knew it would work :D

Copy link
Copy Markdown
Contributor

Thanks! This will help my code base.

@JohanMabille please review! 🙂

Copy link
Copy Markdown

Hi,
Line 1177 has the same .template usage. For my project this change solved the error.

Copy link
Copy Markdown
Contributor

ping @JohanMabille, this is also solving issues in my downstream projects

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

[Bug] Fails to compile with TBB and XSIMD enabled

5 participants


Back | FazBrowse Home | New Git URL