Menu

#3 Fix for compilation error on MSVC2010

open
nobody
None
5
2015-09-09
2010-09-05
Elric
No

__debug_new_recorder::operator->*(_Tp* pointer) gets instantiated with const pointer type in some cases. It appers to be a bug in the compiler as it appears randomly and I cannot reproduce the issue with a small enough example.

When it happens, the following line produces a compilation error:
_M_process(pointer);
as _M_process takes void *, and pointer is a const pointer.

Attached patch solves the issue.

Discussion

  • Elric

    Elric - 2010-09-05
     
  • Wu Yongwei

    Wu Yongwei - 2015-09-09

    Sorry for missing the patch for five years. I might have missed the e-mail notification. Would you please give an example? I really can't imagine why this should happen.