Apparently, although VS 2015 supports the C ++ 11 function with non-static data element initializers (it compiles correctly), the coverage tool pinches this function. Here is the MCVE. I am using VS 14.0.24720.00 Update 1. To play, compile this program, then get code coverage by running it using the General Test . If x initialized, the coverage tool looks for the code for the constructor in the .h file. If you select = 0 , it will correctly define the constructor definition, as in .cpp. In my product code, this was not a constructor, but seemingly random functions, which, according to the coverage tool, were defined in the .h file. The fix, in my case, was simply to move the initialization of the data member to the constructor initialization list.
.
// .cpp
source share