I think making it fails compilation and displays the output in the error message is the whole idea. Similar to the "Type Displayer" trick mentioned by Scott Meyers in CppCon 2014.
In VS 2015, there's usually no need. You can just hover over sizeof(...), and it shows the value in a tooltip. (Also appropriately reflects changes if you e.g. change build configuration.)
Indeed, that would be one way for IntelliSense to not work. :)
I tested this on a huge solution, BTW – over 100 mostly C++ projects – and the sizeof tooltip became available as soon as the source files were parsed, which was a reasonable time (e.g. 10s of seconds) given the size of the solution.
On a small project, of course, it would be practically immediate.
8
u/Grassio789 Oct 20 '16
I think making it fails compilation and displays the output in the error message is the whole idea. Similar to the "Type Displayer" trick mentioned by Scott Meyers in CppCon 2014.