2

When I tried use std::extent_v template it was underscored with red and I got error "namespace std doesn't contain member extent_v" in IDE, but it compiles without an error (<type_traits> is of course included).

When I found its definition in <type_traits> it was disabled along with other variable templates definitions in conditional #if _HAS_VARIABLE_TEMPLATES. _HAS_VARIABLE_TEMPLATES was defined as 0 depending on __EDG__ macro, that wasn't introduced in source code.

What it all means and how can I repair IDE?

aaalex88
  • 619
  • 4
  • 13
  • What version of Visual Studio? – Retired Ninja Feb 28 '17 at 13:50
  • Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 – aaalex88 Feb 28 '17 at 13:52
  • 2
    Read the part about Variable Templates: https://blogs.msdn.microsoft.com/vcblog/2016/02/11/compiler-improvements-in-vs-2015-update-2/ – Retired Ninja Feb 28 '17 at 13:59
  • 3
    If intellisense and the compiler disagree, it's usually intellisense that is wrong. – Baum mit Augen Feb 28 '17 at 14:00
  • IntelliSense uses the [EDG](http://www.edg.com/) compiler front-end. The compiler itself uses either MSC or Clang. The issues reported by IntelliSense are not authoritative. – IInspectable Feb 28 '17 at 14:03
  • Intellisense is very good, but it is not as mature or complete as cl (Visual Studio's compiler). It will some times fail to parse constructs that are in any way "unusual". There usually isn't much you can do other than file a bug report. – François Andrieux Feb 28 '17 at 14:33

0 Answers0