Skip to content

Commit 136f63a

Browse files
committed
test: function template attributes
#test
1 parent 18c9ee8 commit 136f63a

File tree

4 files changed

+105
-0
lines changed

4 files changed

+105
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
= Reference
2+
:mrdocs:
3+
4+
[#index]
5+
== Global namespace
6+
7+
8+
=== Functions
9+
10+
[cols=1]
11+
|===
12+
| Name
13+
14+
| <<f,`f`>>
15+
|===
16+
17+
[#f]
18+
== f
19+
20+
21+
=== Synopsis
22+
23+
24+
Declared in `&lt;attributes&hyphen;2&period;cpp&gt;`
25+
26+
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
27+
----
28+
template&lt;class T&gt;
29+
[[nodiscard]]
30+
int
31+
f();
32+
----
33+
34+
35+
36+
[.small]#Created with https://www.mrdocs.com[MrDocs]#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// issue #851
2+
3+
template <class T>
4+
[[nodiscard]] int f();
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<html lang="en">
2+
<head>
3+
<title>Reference</title>
4+
</head>
5+
<body>
6+
<div>
7+
<h1>Reference</h1>
8+
<div>
9+
<div>
10+
<h2 id="index">Global namespace</h2>
11+
</div>
12+
<h2>Functions</h2>
13+
<table style="table-layout: fixed; width: 100%;">
14+
<thead>
15+
<tr>
16+
<th>Name</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
<tr>
21+
<td><a href="#f"><code>f</code></a> </td></tr>
22+
</tbody>
23+
</table>
24+
</div>
25+
<div>
26+
<div>
27+
<h2 id="f">f</h2>
28+
</div>
29+
<div>
30+
<h3>Synopsis</h3>
31+
<div>
32+
Declared in <code>&lt;attributes-2.cpp&gt;</code></div>
33+
<pre>
34+
<code class="source-code cpp">
35+
template&lt;class T&gt;
36+
[[nodiscard]]
37+
int
38+
f();
39+
</code>
40+
</pre>
41+
</div>
42+
</div>
43+
44+
</div>
45+
<div>
46+
<h4>Created with <a href="https://www.mrdocs.com">MrDocs</a></h4>
47+
</div>
48+
</body>
49+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<mrdocs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc">
4+
<namespace id="//////////////////////////8=">
5+
<template>
6+
<tparam name="T" class="type"/>
7+
<function name="f" id="e/hP0+mSSe5Ju83w/5pueMcFgLQ=">
8+
<file short-path="attributes-2.cpp" source-path="attributes-2.cpp" line="3"/>
9+
<attr id="nodiscard"/>
10+
<return>
11+
<type name="int"/>
12+
</return>
13+
</function>
14+
</template>
15+
</namespace>
16+
</mrdocs>

0 commit comments

Comments
 (0)