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

ICE on MSVC #255

Open
jeremy-rifkin opened this issue May 9, 2022 · 6 comments
Open

ICE on MSVC #255

jeremy-rifkin opened this issue May 9, 2022 · 6 comments

Comments

@jeremy-rifkin
Copy link

jeremy-rifkin commented May 9, 2022

I'm getting an internal compiler error on MSVC with the current code in trunk: https://godbolt.org/z/jexjEsj61

https://raw.githubusercontent.com/hanickadot/compile-time-regular-expressions/5b914a62c71c6c6b336fd466a4e812db635b9fdc/single-header/ctre.hpp(5114): fatal error C1001: Internal compiler error.
(compiler file 'd:\a01\_work\49\s\src\vctools\Compiler\CxxFE\sl\p1\c\constexpr\constexpr.cpp', line 8618)
 To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com 
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information
https://raw.githubusercontent.com/hanickadot/compile-time-regular-expressions/5b914a62c71c6c6b336fd466a4e812db635b9fdc/single-header/ctre.hpp(5126): note: see reference to class template instantiation 'ctre::regex_builder<ctll::fixed_string<9> const `std::basic_string<char,std::char_traits<char>,std::allocator<char> > __cdecl asserts::utility::strip_colors(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)'::`2'::ansi_escape_pattern>' being compiled
<source>(10): note: see reference to variable template 'const auto search<&`asserts::utility::strip_colors'::`2'::ansi_escape_pattern>' being compiled
<source>(29): note: see reference to function template instantiation 'std::string ctre_replace<& ctll::fixed_string<9> const `std::basic_string<char,std::char_traits<char>,std::allocator<char> > __cdecl asserts::utility::strip_colors(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &)'::`2'::ansi_escape_pattern>(std::string_view,std::string_view)' being compiled
INTERNAL COMPILER ERROR in 'C:\data\msvc\14.30.30709-v2\bin\Hostx64\x64\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

edit: goes at least as far back 2.5

@hanickadot
Copy link
Owner

Please report the bug to Microsoft. Internal compiler error is always a bug in compiler. Please link it here then.

@jeremy-rifkin
Copy link
Author

Thank you, I will do so. I figured I'd post here in case there's any way to work around it in the library and in case it warrants updating the supported compilers section of the readme.

@hanickadot
Copy link
Owner

You should try latest version, it seems there is one. CTRE is tricky for compilers :)

@jeremy-rifkin
Copy link
Author

Understandable :) I'm seeing it compiling fine with /std:c++20 at least!

@hanickadot
Copy link
Owner

yeah, you should always use /std:c++20 or higher, CTRE working in 17 mode is just a pure serendipity

@jeremy-rifkin
Copy link
Author

Good to know, thanks so much for the quick reply!

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