File: 104_typedef_merging.cpp

package info (click to toggle)
doxygen 1.15.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,384 kB
  • sloc: cpp: 223,248; lex: 45,536; python: 32,394; ansic: 26,761; xml: 16,962; javascript: 8,627; yacc: 582; f90: 455; php: 427; perl: 384; makefile: 201; sh: 24; objc: 14; cs: 5; java: 1
file content (52 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// objective: test typedef deduplication that properly considers scopes
// check: namespace_root.xml
// check: namespace_root_1_1_sub.xml
// check: struct_root_1_1_sub_1_1_struct.xml

namespace Root {

/** @brief A typedef */
typedef int Int;

/* Documentation comes later */
using Float = float;

namespace Sub {
  /* Documentation comes later */
  typedef double Double;

  /** @brief A struct */
  struct Struct {
    /** @brief A typedef that doesn't get merged with the one in Sub */
    typedef double Double;
  };

  /** @relatedalso Struct
   * @brief A typedef in Sub that doesn't get merged with the one in Root
   */
  typedef int Int;

  /** @relatedalso Struct
   * @brief A using declaration in Sub doesn't get merged with the one in Root
   */
  using Float = float;

  /** @brief Another typedef in Sub, not related to @ref Struct */
  typedef double Double;
}

/** @brief A using declaration */
using Float = float;

/* Documentation comes later */
typedef bool BoolShouldNotBecomeFunction;

/** @brief Another struct */
struct AnotherStruct {};

/** @relatedalso AnotherStruct
 * @brief A typedef that shouldn't become a function
 */
typedef bool BoolShouldNotBecomeFunction;

}