/**
@brief A class forward-declared in one file but defined in another
-Because Doxygen is stupid, it reports the class to be defined in First.h even
-though there's just a fwdecl. Happens only if the class is a template,
-a non-templated class would have its location reported correctly.
+Doxygen < 1.8.20 is stupid and reports the class to be defined in First.h even
+though there's just a fwdecl. Happens only if the class is a template, a
+non-templated class would have its location reported correctly.
-If includes are enabled, members should have Second.h listed as their include,
-but if they are disabled, brief-only members shouldn't have detailed sections
-at all.
+With Doxygen < 1.8.20, if includes are enabled, members should have Second.h
+listed as their include, but if they are disabled, brief-only members shouldn't
+have detailed sections at all. With 1.8.20+, there should be just one (correct)
+include for the whole class.
*/
template<class T> struct SpreadClass {
- /** @brief A function with (detailed) include information but no details if includes are disabled */
+ /** @brief A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+ */
void foo();
};
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>SpreadClass struct | My Project</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <h1>
+ <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="First_8h.html"><First.h></a></div>
+ <div class="m-doc-template">template<class T></div>
+ SpreadClass <span class="m-thin">struct</span>
+ </h1>
+ <p>A class forward-declared in one file but defined in another.</p>
+ <nav class="m-block m-default">
+ <h3>Contents</h3>
+ <ul>
+ <li>
+ Reference
+ <ul>
+ <li><a href="#pub-methods">Public functions</a></li>
+ </ul>
+ </li>
+ </ul>
+ </nav>
+<p>Doxygen < 1.8.20 is stupid and reports the class to be defined in First.h even though there's just a fwdecl. Happens only if the class is a template, a non-templated class would have its location reported correctly.</p><p>With Doxygen < 1.8.20, if includes are enabled, members should have Second.h listed as their include, but if they are disabled, brief-only members shouldn't have detailed sections at all. With 1.8.20+, there should be just one (correct) include for the whole class.</p>
+ <section id="pub-methods">
+ <h2><a href="#pub-methods">Public functions</a></h2>
+ <dl class="m-doc">
+ <dt>
+ <span class="m-doc-wrap-bumper">void <a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc">foo</a>(</span><span class="m-doc-wrap">)</span>
+ </dt>
+ <dd>A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+.</dd>
+ </dl>
+ </section>
+ <section>
+ <h2>Function documentation</h2>
+ <section class="m-doc-details" id="a0537e4d57c78086a29ab6143da0d9a21"><div>
+ <h3>
+ <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="Second_8h.html"><Second.h></a></div>
+ <div class="m-doc-template">
+ template<class T>
+ </div>
+ <span class="m-doc-wrap-bumper">void SpreadClass<T>::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc-self">foo</a>(</span><span class="m-doc-wrap">)</span></span>
+ </h3>
+ <p>A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+.</p>
+ </div></section>
+ </section>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
- <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="First_8h.html"><First.h></a></div>
+ <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="Second_8h.html"><Second.h></a></div>
<div class="m-doc-template">template<class T></div>
SpreadClass <span class="m-thin">struct</span>
</h1>
</li>
</ul>
</nav>
-<p>Because Doxygen is stupid, it reports the class to be defined in First.h even though there's just a fwdecl. Happens only if the class is a template, a non-templated class would have its location reported correctly.</p><p>If includes are enabled, members should have Second.h listed as their include, but if they are disabled, brief-only members shouldn't have detailed sections at all.</p>
+<p>Doxygen < 1.8.20 is stupid and reports the class to be defined in First.h even though there's just a fwdecl. Happens only if the class is a template, a non-templated class would have its location reported correctly.</p><p>With Doxygen < 1.8.20, if includes are enabled, members should have Second.h listed as their include, but if they are disabled, brief-only members shouldn't have detailed sections at all. With 1.8.20+, there should be just one (correct) include for the whole class.</p>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
- <dt>
- <span class="m-doc-wrap-bumper">void <a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc">foo</a>(</span><span class="m-doc-wrap">)</span>
+ <dt id="a0537e4d57c78086a29ab6143da0d9a21">
+ <span class="m-doc-wrap-bumper">void <a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc-self">foo</a>(</span><span class="m-doc-wrap">)</span>
</dt>
- <dd>A function with (detailed) include information but no details if includes are disabled.</dd>
+ <dd>A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+.</dd>
</dl>
</section>
- <section>
- <h2>Function documentation</h2>
- <section class="m-doc-details" id="a0537e4d57c78086a29ab6143da0d9a21"><div>
- <h3>
- <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="Second_8h.html"><Second.h></a></div>
- <div class="m-doc-template">
- template<class T>
- </div>
- <span class="m-doc-wrap-bumper">void SpreadClass<T>::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc-self">foo</a>(</span><span class="m-doc-wrap">)</span></span>
- </h3>
- <p>A function with (detailed) include information but no details if includes are disabled.</p>
- </div></section>
- </section>
</div>
</div>
</div>
</li>
</ul>
</nav>
-<p>Because Doxygen is stupid, it reports the class to be defined in First.h even though there's just a fwdecl. Happens only if the class is a template, a non-templated class would have its location reported correctly.</p><p>If includes are enabled, members should have Second.h listed as their include, but if they are disabled, brief-only members shouldn't have detailed sections at all.</p>
+<p>Doxygen < 1.8.20 is stupid and reports the class to be defined in First.h even though there's just a fwdecl. Happens only if the class is a template, a non-templated class would have its location reported correctly.</p><p>With Doxygen < 1.8.20, if includes are enabled, members should have Second.h listed as their include, but if they are disabled, brief-only members shouldn't have detailed sections at all. With 1.8.20+, there should be just one (correct) include for the whole class.</p>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
<dt id="a0537e4d57c78086a29ab6143da0d9a21">
<span class="m-doc-wrap-bumper">void <a href="#a0537e4d57c78086a29ab6143da0d9a21" class="m-doc-self">foo</a>(</span><span class="m-doc-wrap">)</span>
</dt>
- <dd>A function with (detailed) include information but no details if includes are disabled.</dd>
+ <dd>A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+.</dd>
</dl>
</section>
</div>
/**
@brief A class forward-declared in one file but defined in another
-Because Doxygen is stupid, it reports the class to be defined in First.h even
-though there's just a fwdecl. Happens only if the class is a template,
-a non-templated class would have its location reported correctly.
+Doxygen < 1.8.20 is stupid and reports the class to be defined in First.h even
+though there's just a fwdecl. Happens only if the class is a template, a
+non-templated class would have its location reported correctly.
-If includes are enabled, members should have Second.h listed as their include,
-but if they are disabled, brief-only members shouldn't have detailed sections
-at all.
+With Doxygen < 1.8.20, if includes are enabled, members should have Second.h
+listed as their include, but if they are disabled, brief-only members shouldn't
+have detailed sections at all. With 1.8.20+, there should be just one (correct)
+include for the whole class.
*/
template<class T> struct SpreadClass {
- /** @brief A function with (detailed) include information but no details if includes are disabled */
+ /** @brief A function with (detailed) include information on < 1.8.20 but no details if includes are disabled or on 1.8.20+ */
void foo();
};
self.assertEqual(*self.actual_expected_contents('namespaceSpread.html'))
self.assertEqual(*self.actual_expected_contents('classClass.html'))
self.assertEqual(*self.actual_expected_contents('group__group.html'))
- self.assertEqual(*self.actual_expected_contents('structSpreadClass.html'))
+
+ # The bug this tests for happens only on < 1.8.20. Maybe it's fixed in
+ # 1.8.19 already, but I only have 1.8.18 and 1.8.20 available to test.
+ if parse_version(doxygen_version()) >= parse_version("1.8.20"):
+ self.assertEqual(*self.actual_expected_contents('structSpreadClass.html'))
+ else:
+ self.assertEqual(*self.actual_expected_contents('structSpreadClass.html', 'structSpreadClass-1818.html'))
# These two should all have local includes because otherwise it gets
# misleading; the Empty namespace a global one