diff options
-rw-r--r-- | slicer/slicer/any_ptr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/slicer/slicer/any_ptr.h b/slicer/slicer/any_ptr.h index 34f8529..14199c0 100644 --- a/slicer/slicer/any_ptr.h +++ b/slicer/slicer/any_ptr.h @@ -9,6 +9,14 @@ namespace Slicer { // NOLINTNEXTLINE(hicpp-explicit-conversions) inline constexpr any_ptr(T * p) noexcept : ptr {p} { } + // cppcheck-suppress noExplicitConstructor + // NOLINTNEXTLINE(hicpp-explicit-conversions) + inline constexpr any_ptr(T & p) noexcept : ptr {&p} { } + + // cppcheck-suppress noExplicitConstructor + // NOLINTNEXTLINE(hicpp-explicit-conversions) + inline constexpr any_ptr(T && p) noexcept : ptr {&p} { } + template<typename S> requires requires(S p) { p.get(); } // cppcheck-suppress noExplicitConstructor |