Skip to content

Commit 7734b53

Browse files
authored
Merge pull request #4685 from danpoe/feature/sharing-map-leafs
Change sharing map so that leafs can be directly attached to internal nodes
2 parents e794441 + d438341 commit 7734b53

File tree

5 files changed

+567
-535
lines changed

5 files changed

+567
-535
lines changed

src/util/as_const.h

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ const T &as_const(T &value)
1616
return static_cast<const T &>(value);
1717
}
1818

19+
/// Return a pointer to the same object but ensures the type is pointer to const
20+
template <typename T>
21+
const T *as_const_ptr(T *t)
22+
{
23+
return t;
24+
}
25+
1926
/// Deleted to avoid calling as_const on an xvalue
2027
template <typename T>
2128
void as_const(T &&) = delete;

0 commit comments

Comments
 (0)