Debian Codegraph @

testing/projects/cpp_nesting/include/nested/dual_nested/one/one.hpp

raw
1 /***************************************************************************************
2 * This file is dedicated to the public domain. If your jurisdiction requires a *
3 * specific license: *
4 * *
5 * Copyright (c) Stephen McDowell, 2017-2024 *
6 * License: CC0 1.0 Universal *
7 * License Text: https://creativecommons.org/publicdomain/zero/1.0/legalcode *
8 **************************************************************************************/
9 /**
10 * \file
11 *
12 * \brief This file should be two levels down in the hierarchy.
13 */
14 #pragma once
15
16 namespace nested {
17 namespace dual_nested {
18 /// The first class inside the ``nested::dual_nested`` namespace.
19 struct one {
20 /// Nesting even further: ``nested::dual_nested::one::params``.
21 struct params {
22 /// A union that occupies four bytes: https://en.cppreference.com/w/cpp/language/union
23 union four_bytes {
24 std::int32_t n; ///< occupies 4 bytes
25 std::uint16_t s[2];///< occupies 4 bytes
26 std::uint8_t c; ///< occupies 1 byte
27 };
28
29 /// Returns ``true`` ;)
30 bool compiles() { return true; }
31 };
32
33 /// Returns ``true`` ;)
34 bool compiles() { return true; }
35 };
36 }
37 }