[libcxx-commits] [libcxx] [libc++] LWG4324: `unique_ptr<void>::operator*` is not SFINAE-friendly (PR #190919)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 8 00:02:46 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libcxx/include/__memory/unique_ptr.h libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp
index c91b6358e..c6ef0d7c7 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.single.pass.cpp
@@ -32,9 +32,9 @@ struct Deleter {
 };
 #endif
 
-template<class, class = void>
+template <class, class = void>
 struct can_dereference : std::false_type {};
-template<class T>
+template <class T>
 struct can_dereference<T, decltype((void)*std::declval<T>())> : std::true_type {};
 
 static_assert(can_dereference<std::unique_ptr<int> >::value, "");

``````````

</details>


https://github.com/llvm/llvm-project/pull/190919


More information about the libcxx-commits mailing list