Skip to content

not accepting code of "c++17" or "gnu++17" unable to compile code #7162

@ghost

Description

Issue Type: Bug

Trying to run code which have "constexpr" keyword and continiously getting this error , the same code is successfully compiled in codeblock.
Note: Also checked by changing cppstandard setting to "c++17" and "gnu++17" but still same error

[Running] cd "d:\codeblock" && g++ t.cpp -o t && "d:\codeblock"t
t.cpp: In member function 'void Solution_3sum::nSumStep(const int*, const int*, int, FoundNums ...)':
t.cpp:178:12: warning: 'if constexpr' only available with -std=c++17 or -std=gnu++17
if constexpr (count == 2)

Extension version: 1.2.2
VS Code version: Code 1.54.2 (fd6f3bce6709b121a895d042d343d71f317d74e7, 2021-03-11T00:56:19.848Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz (4 x 1992)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 3.90GB (0.64GB free)
Process Argv --crash-reporter-id 05c17531-75db-4467-a8a7-f1e58ae986c6
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt700cf:30270857
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244cf:30256637
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
dockersubset:30270708
pythontbcf:30265426
vspre833:30267464

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions