<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64087>64087</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wdocumentation doesn't work correctly with template parameters
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
artiomn
</td>
</tr>
</table>
<pre>
Code:
```cpp
/**
* @brief Find index of an entity type in its variant.
* @details For example, you can use the method to find an index of a message type in a message variant or an index
* of a subscription type in a subscription variant.
* @tparam Variant variant of one or more entity types.
* @tparam Type entity type to search.
*/
template <typename Variant, typename Type>
static constexpr size_t get_type_index = boost::mp11::mp_find<Variant, Type>::value;
```
CLang result:
```
In file included from /vsts/agent/_work/2/core/message_bus.h:10:
/vsts/agent/_work/2/core/message_endpoint.h:67:9: warning: '@tparam' command used in a comment that is not attached to a template declaration [-Wdocumentation]
* @tparam Variant variant of one or more entity types.
^~~~~~
/vsts/agent/_work/2/core/message_endpoint.h:68:9: warning: '@tparam' command used in a comment that is not attached to a template declaration [-Wdocumentation]
* @tparam Type entity type to search.
^~~~~~
/vsts/agent/_work/2/core/message_endpoint.h:67:9: warning: '@tparam' command used in a comment that is not attached to a template declaration [-Wdocumentation]
* @tparam Variant variant of one or more entity types.
^~~~~~
/vsts/agent/_work/2/core/message_endpoint.h:68:9: warning: '@tparam' command used in a comment that is not attached to a template declaration [-Wdocumentation]
* @tparam Type entity type to search.
^~~~~~
4 warnings generated.
4 warnings generated.
[ 90%] Linking CXX static library ...library.a
[ 90%] Built target ...-library
gmake: *** [Makefile:156: all] Error 2
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk2PqzYU_TXO5moQMSEkCxb5GKRKr7uqfbvoAhdwx9jIvsxMuuhvr0w-J-3TU9VZVFURSpxr33Psc48do_eqNUS5SLci3c9w5M66HB0r25tZaetjvrM1iWQj4r2IL5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