Linking complicated classes

meator <[email protected]> Sun, 9 Jul 2023 19:35:39 +0200
Newsgroups gmane.text.doxygen.general
Message-ID <[email protected]>
Hi. I have the following two classes in my code:

```
template <class, class = void>
struct is_printable : std::false_type
{
};

/**
  * @brief Type trait that indicates if class is printable.
  *
  * This type trait indicates that type _T_ is printable i.e. `os << 
val` is a
  * valid expression (where `os` is a instance of `std::ostream` or one 
of it's
  * subclasses and `val` is a instance of _T_).
  */
template <class T>
struct is_printable<
   T,
   std::void_t<decltype(std::declval<std::ostream>() << std::declval<T>())>>
     : std::true_type
{
};
```

When I try to write `@ref is_printable` somewhere else in the 
documentation, the link points to the first class that contains no 
documentation. I want to link to the second class. But that's 
complicated (and pretty impractical). I have tried @ref is_printable<T, 
std::void_t<decltype(std::declval(std::ostream)() << 
std::declval(T)())>> but it picked up only the 'is_printable' part which 
(again) linked to the first class. How can I link to the second class?