boostorg / boostorg/smart_ptr

MSVC C++ 20 With Diagnostic Services

Open
#109 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
111
Forks
116
PR merge metrics
No merged PRs in 30d

Description

The following information is odd anyway and as you'll see is easy to resolve on our side. Meaning I wasn't thinking any actions need to be done at all; but figured at least let you know about it.

First consider Microsoft has the ability to detect memory leaks with some [Diagnostic Services](https://learn.microsoft.com/en-us/cpp/mfc/reference/diagnostic-services?view=msvc-170) via redefining the `new` operator:
![image](https://github.com/boostorg/smart_ptr/assets/3475163/761a7cba-09e8-458e-9307-4f288d6cd8a0)

With C++17 this isn't a problem as you can see with this online link: https://godbolt.org/z/nx35hhY9r

(note: Compiler Explorer doesn't install with MFC/ATL but those defines should give similar effect).

It builds. But if you change the setting to build as C++20 (or later) it fails to compile; here is an online link: https://godbolt.org/z/M3ba6r48h
![image](https://github.com/boostorg/smart_ptr/assets/3475163/dd13641c-5ecc-4c66-b8bd-e0f99692a6cd)

I, myself, am using `boost` 1.81.0 where I am noticing this issue.

Hope that helps!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.