-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Feature: Auto-completeLanguage ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugverifiedBug has been reproducedBug has been reproduced
Milestone
Description
Environment
- OS and Version: Ubuntu 23.04
- VS Code Version: 1.79.0
- C/C++ Extension Version: 1.16.3
Bug Summary and Steps to Reproduce
Bug Summary:
Normally if you instantiate an object that has some constrains on members and methods, those members and methods will autofill. This does not happen if the object in marked const.
I'm using GCC 13.0.1 x86_64. The following code is a minimal example.
#include <concepts>
struct Types
{
struct Real
{
void reduce() const {}
};
};
template <typename Real>
concept IsReal =
requires (const Real real) {
{
real.reduce()
} -> std::same_as<void>;
};
template <IsReal Real>
struct Foo {
Foo () {
Real real;
real.reduce(); // this will autocomplete
const Real const_real;
const_real.reduce(); // this will NOT autocomplete
}
};
int main()
{
Foo<Types::Real> {};
}
Configuration and Logs
I don't have a c_cpp_properties.json in my .vscode directory. Only a settings.json, and the only field besides file associations is
"C_Cpp.default.compilerPath": "/usr/bin/gcc-13"
### Other Extensions
_No response_
### Additional context
_No response_
M-Kusumgar
Metadata
Metadata
Assignees
Labels
Feature: Auto-completeLanguage ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugverifiedBug has been reproducedBug has been reproduced