diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2017-12-28 09:02:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2017-12-28 09:02:36 (GMT) |
commit | 9538bfd15c99aceb619f426b30c87004c4820370 (patch) | |
tree | d73db0110b43928cdea13a3a49726b7aac24f670 /testing/070_ref_variadic_template.cpp | |
parent | 27731a36c182f672fe4486c4a9ae390c4ee8a10f (diff) | |
parent | dd88186b18613388902e4921e5203375458783b6 (diff) | |
download | Doxygen-9538bfd15c99aceb619f426b30c87004c4820370.zip Doxygen-9538bfd15c99aceb619f426b30c87004c4820370.tar.gz Doxygen-9538bfd15c99aceb619f426b30c87004c4820370.tar.bz2 |
Merge branch 'mehw-variadic'
Diffstat (limited to 'testing/070_ref_variadic_template.cpp')
-rw-r--r-- | testing/070_ref_variadic_template.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/testing/070_ref_variadic_template.cpp b/testing/070_ref_variadic_template.cpp new file mode 100644 index 0000000..376cebe --- /dev/null +++ b/testing/070_ref_variadic_template.cpp @@ -0,0 +1,95 @@ +// objective: test \ref command with a variadic template function +// check: 070__ref__variadic__template_8cpp.xml + +/** \file + * + * @attention + * @parblock + * At the time of writing, the part between \<\> is totally ignored: + * %func<Args...>(Args... args) is interpreted as %func(Args... args). + * + * Beware that a function parameter with either a \& or \* operator, + * e.g. 'const Args&... args', requires \\link and \\ref to specify + * such parameter as verbatim, i.e. 'const Args&... args'. At the + * time of writing, the form %func(const Args&...) will fail, unless + * the function parameter was declared just as 'const Args&...'. + * @endparblock + * + * \ref Test::func(int,Args...)const "variadic template method" + * + * References to the variadic template function overloads: + * @li \ref func(int,Args&... args) "First overload" + * @li \ref func(int,Args&&... args) "Second overload" + * @li \ref func(int,const Args&... args) "Third overload" + * @li \ref func(int,const Args&&... args) "Fourth overload" + * @li \ref func(int,Args*... args) "Fifth overload" + * @li \ref func(int,Args**... args) "Sixth overload" + * @li \ref func(int,const Args*... args) "Seventh overload" + * @li \ref func(int,const Args**... args) "Eighth overload" + * @li \ref func(int,Args...) "Ninth overload" + * + * The followings are interpreted the same: + * @li \ref func(int,const Args&... args) "without template argument" + * @li \ref func<Args...>(int,const Args&... args) "with template argument" + * + * See the \ref Test "test" class. + */ + +/** A function + */ +void func(int p); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, Args&... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, Args&&... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, const Args&... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, const Args&&... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, Args*... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, Args**... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, const Args*... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, const Args**... args); + +/** A variadic template function overload + */ +template <typename... Args> +void func(int p, Args... args); + +/** A test */ +class Test +{ + public: + /** A variadic template method + */ + template <typename... Args> + void func(int p, Args... args) const; +}; |