Skip to content

Commit 0e1cc3d

Browse files
committed
Hide slice implementation details from name lookup
1 parent 0e3f776 commit 0e1cc3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/cxx.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ class Slice final
180180
void swap(Slice &) noexcept;
181181

182182
private:
183+
friend void sliceInit(void *, const void *, std::size_t) noexcept;
184+
friend void *slicePtr(const void *) noexcept;
185+
friend std::size_t sliceLen(const void *) noexcept;
186+
183187
std::array<std::uintptr_t, 2> repr;
184188
};
185189

@@ -485,10 +489,6 @@ constexpr unsafe_bitcopy_t unsafe_bitcopy{};
485489

486490
#ifndef CXXBRIDGE1_RUST_SLICE
487491
#define CXXBRIDGE1_RUST_SLICE
488-
void sliceInit(void *, const void *, std::size_t) noexcept;
489-
void *slicePtr(const void *) noexcept;
490-
std::size_t sliceLen(const void *) noexcept;
491-
492492
template <typename T>
493493
Slice<T>::Slice() noexcept {
494494
sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);

0 commit comments

Comments
 (0)