Fixes and testing update for MSVC in C++20 mode.

This commit is contained in:
jzmaddock
2021-03-07 08:42:18 +00:00
parent e74d65810e
commit 92fe5dd4d6
6 changed files with 103 additions and 167 deletions

View File

@ -133,7 +133,7 @@ private:
void cow()
{
// copy-on-write
if(pdata.get() && !pdata.unique())
if(pdata.get() && (pdata.use_count() > 1))
{
pdata.reset(new impl(*(pdata.get())));
}