Repository navigation
Incorrect constraint check for call to module-imported function template with deduced return type #242
cpplearner
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
When a call to an uninstantiated function template with deduced return type appears in a requires-expression, and the function template is imported from a (MSVC-generated) IFC file, EDG evaluates the constraint to false, even though a direct call to the function template works fine.
Like #230, this bug affects the uses of intelliSense with
import std;because MSVC STL'sstd::ranges::beginhas anoperator()with a deduced return type, andstd::ranges::rangecallsstd::ranges::beginin its requires-expression.Reproducing Source Code
mod1.ixx(compiled with MSVC'scl.exe /c /std:c++20 mod1.ixx):example.cxx(compiled with\CXX\edgcpp-compiler\build\msvc-release\bin\cpfe.exe --ms_c++20 --modules example.cxx):Command-line Options
cpfe.exe --ms_c++20 --modules example.cxx
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
The IFC file is generated by MSVC Compiler Version 19.52.36815 for x64 (PREVIEW). The file
example.cxxcompiles fine withcl.exe /std:c++20 example.cxxand fails to compile withcl.exe /BE /std:c++20 example.cxx.This is the generated IFC file (zipped):
mod1.ifc.zip
Reproducing (Standard) Configuration(s)
windows-msvc-release
Reproducing (Non-standard) Configuration
No response
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions