Blame tests/upstream-test-suite/069_link_variadic_template.cpp

Than Ngo b7bcaa
// objective: test \link command with a variadic template function
Than Ngo b7bcaa
// check: 069__link__variadic__template_8cpp.xml
Than Ngo b7bcaa
Than Ngo b7bcaa
/** \file
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  @attention
Than Ngo b7bcaa
 *  @parblock
Than Ngo b7bcaa
 *  At the time of writing, the part between \<\> is totally ignored:
Than Ngo b7bcaa
 *  %func<Args...>(Args... args) is interpreted as %func(Args... args).
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  Beware that a function parameter with either a \& or \* operator,
Than Ngo b7bcaa
 *  e.g. 'const Args&... args', requires \\link and \\ref to specify
Than Ngo b7bcaa
 *  such parameter as verbatim, i.e. 'const Args&... args'.  At the
Than Ngo b7bcaa
 *  time of writing, the form %func(const Args&...) will fail, unless
Than Ngo b7bcaa
 *  the function parameter was declared just as 'const Args&...'.
Than Ngo b7bcaa
 *  @endparblock
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  \link Test::func(int,Args...)const variadic template method\endlink
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  Links to the variadic template function overloads:
Than Ngo b7bcaa
 *    @li \link func(int,Args&... args) First overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,Args&&... args) Second overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,const Args&... args) Third overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,const Args&&... args) Fourth overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,Args*... args) Fifth overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,Args**... args) Sixth overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,const Args*... args) Seventh overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,const Args**... args) Eighth overload\endlink
Than Ngo b7bcaa
 *    @li \link func(int,Args...) Ninth overload\endlink
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  The followings are interpreted the same:
Than Ngo b7bcaa
 *    @li \link func(int,const Args&... args) without template argument\endlink
Than Ngo b7bcaa
 *    @li \link func<Args...>(int,const Args&... args) with template argument\endlink
Than Ngo b7bcaa
 *
Than Ngo b7bcaa
 *  See the \link Test test\endlink class.
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A function
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
void func(int p);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, Args&... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, Args&&... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, const Args&... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, const Args&&... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, Args*... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, Args**... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, const Args*... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, const Args**... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A variadic template function overload
Than Ngo b7bcaa
 */
Than Ngo b7bcaa
template <typename... Args>
Than Ngo b7bcaa
void func(int p, Args... args);
Than Ngo b7bcaa
Than Ngo b7bcaa
/** A test */
Than Ngo b7bcaa
class Test
Than Ngo b7bcaa
{
Than Ngo b7bcaa
 public:
Than Ngo b7bcaa
  /** A variadic template method
Than Ngo b7bcaa
   */
Than Ngo b7bcaa
  template <typename... Args>
Than Ngo b7bcaa
  void func(int p, Args... args) const;
Than Ngo b7bcaa
};