Fix Issue 11861 (#11886)
authorXiang Fan <xiangfan@microsoft.com>
Wed, 24 May 2017 22:51:38 +0000 (15:51 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 24 May 2017 22:51:38 +0000 (15:51 -0700)
commit0ad57d9177ac88aabbf9354b985c5ac192a307e7
tree0d125e197cda4a2e9183073f34b2afb9532debfb
parentf853a04ea9c80bf63419a07fe3fe2fefb23d25aa
Fix Issue 11861 (#11886)

* Fix issues exposed by building with MSVC and /permissive-.

Using full-qualified name to declare members inside class is ill-formed and incorrectly allowed by MSVC.
MSVC now gives error when /permissive- is used.

* Add a forward declaration for SafeAddRef from utilcode.h.
SafeAddRef in holder.h calls SafeAddRef in utilcode.h. The latter hasn't been declared yet, so it isn't a valid candidate during overload resolution.
It happens to work in MSVC default mode because of the lack of two phase name lookup.
src/inc/holder.h