Skip to content

Intellisense can't deduce operator* #6814

Closed as not planned
Closed as not planned

Description

@InKryption

Issue Type: Bug

Intellisense reports that 'more than one operator "*" matches these operands [...]' with:

template<size_t rows, size_t cols, typename Int = int>
class Matrix {
...
public:
template<typename _Int> Matrix operator*(const _Int& rhs) const { ... }

template<size_t _Cols, typename _Int>
Matrix<rows, _Cols, Int> operator*(const Matrix<cols, _Cols, _Int>& rhs) const { ... }
...
};

template<size_t, size_t cols, typename Int, typename _Int>
Matrix<rows, cols, Int> operator* (_Int lhs, const Matrix<rows, cols, Int>& rhs) { ... }

when I do:

auto matrix3 = matrix1 * matrix2;

Even though code compiles fine under x86_64-w64-mingw32-g++-win32/posix 8.3; this is the same on both insiders and normal release, and occurs the same using standards 11 through 20. It's not the worst thing, but it is annoying.

Extension version: 1.2.0-insiders
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.19.128-microsoft-standard

System Info
Item Value
CPUs AMD A9-9420e RADEON R5, 5 COMPUTE CORES 2C+3G (2 x 1797)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.46GB (7.13GB free)
Process Argv --folder-uri=vscode-remote://wsl+Debian/home/ink/dev/Matrix --remote=wsl+Debian --crash-reporter-id 057ea1d6-98a1-4c45-ba88-dd945febf03d
Screen Reader no
VM 0%
Item Value
Remote WSL: Debian
OS Linux x64 4.19.128-microsoft-standard
CPUs AMD A9-9420e RADEON R5, 5 COMPUTE CORES 2C+3G (2 x 1796)
Memory (System) 8.91GB (7.95GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
openlogontheside:30221877
python383:30185418
pythonvspyt700:30244268
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
wsl2prompt:30224612
pythonvsdeb440cf:30242243
unusedprompt:30224610
folderexplorer:30224614
openfilemenu:30224647
pythonvsded773:30236629
pythonvspyt600cf:30247032

Activity

  1. sean-mcmanus commented on Jan 20, 2021

    @sean-mcmanus
    Contributor

    Thanks for reporting this. I've filed an internal bug against our parser shared with VS. The bug only repros in "gcc" mode, so one potential workaround would be to set your compilerPath to a clang++ compiler instead (to use clang mode).

  2. bobbrow commented on Mar 19, 2026

    @bobbrow
    Contributor

    Thank you for the report. We’re closing this as not planned.
    This issue has been inactive for a long time and if the VS bug filed has not been fixed yet, it is likely that we won't be getting a fix in VS Code any time soon.

  3. locked and limited conversation to collaborators on May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions