Skip to content

Commit

Permalink
support private aliases in public context
Browse files Browse the repository at this point in the history
#test

fix #794
  • Loading branch information
alandefreitas committed Jan 15, 2025
1 parent 1e392f7 commit 0d046cb
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 0 deletions.
59 changes: 59 additions & 0 deletions test-files/golden-tests/metadata/class-private-alias.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
= Reference
:mrdocs:

[#index]
== Global namespace


=== Types

[cols=1]
|===
| Name

| <<S,`S`>>
|===

[#S]
== S


=== Synopsis


Declared in `&lt;class&hyphen;private&hyphen;alias&period;cpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class S;
----

=== Member Functions

[cols=1]
|===
| Name

| <<S-f,`f`>>
|===



[#S-f]
== <<S,S>>::f


=== Synopsis


Declared in `&lt;class&hyphen;private&hyphen;alias&period;cpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
f(type);
----



[.small]#Created with https://www.mrdocs.com[MrDocs]#
6 changes: 6 additions & 0 deletions test-files/golden-tests/metadata/class-private-alias.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class S
{
using type = int;
public:
void f(type) {}
};
76 changes: 76 additions & 0 deletions test-files/golden-tests/metadata/class-private-alias.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<html lang="en">
<head>
<title>Reference</title>
</head>
<body>
<div>
<h1>Reference</h1>
<div>
<div>
<h2 id="index">Global namespace</h2>
</div>
<h2>Types</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#S"><code>S</code></a> </td></tr>
</tbody>
</table>
</div>
<div>
<div>
<h2 id="S">S</h2>
</div>
<div>
<h3>Synopsis</h3>
<div>
Declared in <code>&lt;class-private-alias.cpp&gt;</code></div>
<pre>
<code class="source-code cpp">
class S;
</code>
</pre>
</div>
<h2>Member Functions</h2>
<table style="table-layout: fixed; width: 100%;">
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#S-f"><code>f</code></a> </td></tr>
</tbody>
</table>


</div>
<div>
<div>
<h2 id="S-f"><a href="#S">S</a>::f</h2>
</div>
<div>
<h3>Synopsis</h3>
<div>
Declared in <code>&lt;class-private-alias.cpp&gt;</code></div>
<pre>
<code class="source-code cpp">
void
f(type);
</code>
</pre>
</div>
</div>

</div>
<div>
<h4>Created with <a href="https://www.mrdocs.com">MrDocs</a></h4>
</div>
</body>
</html>
15 changes: 15 additions & 0 deletions test-files/golden-tests/metadata/class-private-alias.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<mrdocs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
<namespace id="//////////////////////////8=">
<class name="S" id="pOYGF6pLJlICuiGO0Xj0daDb/to=">
<file path="class-private-alias.cpp" line="1" class="def"/>
<function name="f" id="rEl08eLCQtT5kTV7R87YlkuVPa8=">
<file path="class-private-alias.cpp" line="5" class="def"/>
<param>
<type name="type"/>
</param>
</function>
</class>
</namespace>
</mrdocs>

0 comments on commit 0d046cb

Please sign in to comment.