Skip to content

Commit 00ea389

Browse files
committed
add a comment explainin why std::enable_if is used on this method
1 parent 30da81d commit 00ea389

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/ADT/ilist_node.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ class ilist_node_impl
149149
///
150150
/// This requires sentinel tracking to be explicitly enabled. Use the
151151
/// ilist_sentinel_tracking<true> option to get this API.
152+
///
153+
/// Rather than using static_assert to enforce the API is not called when
154+
/// configured with is_sentinel_tracking_explicit=false, the method is
155+
/// conditionally provided using std::enable_if. This way, clients of
156+
/// ilist_node_impl can be fully instantiated for DLLExport on Windows.
152157
template <typename T = OptionsT>
153158
std::enable_if_t<T::is_sentinel_tracking_explicit, bool> isSentinel() const {
154159
return node_base_type::isSentinel();

0 commit comments

Comments
 (0)