cppalliance / mrdocs

MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
https://mrdocs.com
Other
66 stars 16 forks source link

Generate SFINAE examples #593

Open alandefreitas opened 1 month ago

alandefreitas commented 1 month ago

There should be a Mr. Docs-supported solution for giving user usage examples of SFINAE for traits without having to write them out entirely every time. For instance,

template< class CharSet >
typename std::enable_if< is_charset<T>::value >::type
func( CharSet const& cs );
template< class CharSet, typename = std::enable_if< is_charset<T>::value >::type >
void
func( CharSet const& cs );
template< class CharSet >
void
func( CharSet const& cs, typename std::enable_if<is_charset<T>::value>::type* = 0 );