Skip to content

Commit 82bc0e6

Browse files
nwf-msrmjp41
authored andcommitted
ds/aba: make Cmp constructor explicit
For reasons unknown, this appeases MSVC using C++20.
1 parent 77ebff6 commit 82bc0e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ds/aba.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ namespace snmalloc
8585
Linked old;
8686
ABA* parent;
8787

88+
/*
89+
* MSVC apparently does not like the implicit constructor it creates when
90+
* asked to interpret its input as C++20; it rejects the construction up
91+
* in read(), above. Help it out by making the constructor explicit.
92+
*/
93+
Cmp(Linked old, ABA* parent) : old(old), parent(parent) {}
94+
8895
T* ptr()
8996
{
9097
return old.ptr;

0 commit comments

Comments
 (0)