1 UCPP-Doc Example#

Any included entity can be referenced, like this example::print

Method ref to class member: x.method().method()

1.1 Example code-blocks#

Extracted from second_example.hpp

1// Let:
2example::My_type & x = ...;
3
4example::My_type* rt = &x.method<43>();
5rt->method<43>().method<43>()
6        .method<43>();
7auto y = example::MyEnum::a;
8return rt;

1.2 Complete files:#

#include <example.hpp>

MY_MACRO(x)#
[src]
#define MY_MACRO(x) (x*x)

some macro

int MY_global_func(const char* xy)#
[src]

Attributes

  • C-Linkage

  • DLL-Exported

brief description

another paragraph with multiple lines

Parameters:

xy – The documentation for ARG xy

Precondition:

Some precondition

struct MY_c_style_struct#
[src]

Attributes

  • POD

  • Semi-Regular

  • Typedef-Struct

public:

int x#
[src]

comment

float y#
[src]

union [anonymous] u#
[src]

public:

int a#
[src]

float b#
[src]

using MY_opaque_handle = struct MY_opaque_handle#
[src]

Attributes

  • Opaque-Handle

  • Typedef-Struct

void MY_global_func_2(MY_c_style_struct*)#
[src]

Attributes

  • C-Linkage

namespace example
template<typename T>
concept Addable#
[src]

Requirements

Let

T a#

An lvalue

Requirements

  • add(a, a), evaluates to a T&

  • a.count(), evaluates to an integer type

An example concept

template<Addable T>
void concept_f1(T)#
[src]

Requirements

template<typename T>
void concept_f(T)#
[src]
template<typename T>
void concept_f(T)#
requires is_meowable<T>
[src]
template<Meowable T>
void concept_f(T)#
requires (sizeof(T) < 16)
[src]

Requirements

template<class T>
bool is_meowable = true#
[src]

Attributes

  • Constexpr

template<typename T>
concept Meowable#
[src]

Requirements

template<typename T, typename U>
struct My_template#
[src]

Attributes

  • Hashable

  • POD

  • Semi-Regular

Requirements

  • sizeof(T) < 8

using my_typedef = char#
[src]

using

using my_typedef_2 = char#
[src]

typedef

void trailing_comment_test()#
[src]

trailing comment

int test_auto()#
[src]

auto

int& test_auto_ref(int& i)#
[src]

auto&

int test_auto_decltype(int& i)#
[src]

decltype(auto)

int test_trailing_return(int i)#
[src]

trailing return type

Meowable auto cat()#
[src]

template<typename T>
using my_typedef_3 = const T#
[src]

template-alias

enum MyEnumA#
[src]

Deprecated

Long reason why one should not use MyEnumA

enumerator foo#
[src]

enumerator bar#
[src]

enum class MyEnum : int#
[src]

enumerator a = 42#
[src]

enumerator b#
[src]

comment about b

enumerator c = 3#
[src]

enumerator d#
[src]

enumerator e#
[src]

using MyEnumAlias = MyEnum#
[src]

int f1() noexcept#
[src]
int f1(float x) noexcept#
[src]
int f1(const std::string& x) noexcept(sizeof(int) > 2)#
[src]
int f1(float x, int y)#
[src]

Attributes

  • Constexpr [1,2]

Doc-String about f1 overload-set

with multiple

lines

  1. Comment about the float-overload, specifically.

  2. Additional text specific to string overload.

    Which can consist of multiple lines…

    • and also

    • other

    • lists

  3. two parameters

    Multi-Part std-reference: std::partial_ordering::unordered

Parameters:
  • x – X_DESCR [2,3,4]

  • y – Y_DESCR [4]

Returns:

RET_DESCR [2,3,4]

Throws:
  • B – only from f1(float) [2]

  • C – thrown by all overloads [2,3,4]

  • std::exception – only from f1(const std::string&) [3]

void f2(int)#
[src]
void f2(float)#
[src]

Overload with single comment

void f3(int)#
[src]
void f3(float)#
[src]

Overload with single comment

  1. And some specific part on the first

template<typename ...Ts>
auto print(Ts&&... ts)#
[src]

some std::printf()-like template

Template Parameters:

Ts – template parameter

Parameters:

ts – value parameter

Returns:

return value

TODO

something that still needs doing

another normal paragraph

with a large line break

indentation test

References to external projects: glfwInit(), std::string.

Inline non-C++ code #~~>x

Danger

Danger Danger Danger

This line should also be part of the previous command!

Danger

And this is a new one

1#include <iostream>
2
3int main() {
4	std::cout << "Example\n";
5	print(42.f);
6}

See also

My_type, My_other_type, f3

class My_other_type#
[src]

Attributes

  • POD

  • Regular

public:

friend bool operator==(const My_other_type& lhs, const My_other_type& rhs)#
[src]
friend bool operator==(const My_other_type& lhs, int rhs)#
[src]

Attributes

  • Hidden-Friend

hidden friend (should be included in My_other_type)

  1. hidden friend (should be included in My_other_type)

class My_type#
[src]

Attributes

  • Abstract

  • Copyable

  • Polymorphic

a class

method ref: x.method()

public:

My_type(int)#
[src]

template<int N>
My_type& method()#
[src]

Requirements

  • N > 42

friend bool operator==(const My_type& lhs, const My_type& rhs)#
[src]

Attributes

  • Hidden-Friend

hidden friend (should be included in My_type)

protected:

virtual int foo() = 0#
[src]

template<typename T>
class Class_template#
[src]

Attributes

  • Semi-Regular

  • Standard-Layout

public:

Class_template() = default#
[src]

~Class_template() noexcept(false)#
[src]

template<typename U>
operator U()#
[src]

Requirements

  • sizeof(U) == sizeof(T)

void requires_test()#
[src]

Requirements

class Moveonly#
[src]

Attributes

  • Move-only

  • Standard-Layout

public:

Moveonly(const Moveonly&) = delete#
[src]
Moveonly(Moveonly&&) = default#
[src]

Attributes

  • Constexpr [2]

Moveonly& operator=(const Moveonly&) = delete#
[src]
Moveonly& operator=(Moveonly&&) = default#
[src]

class Moveonly_sub : public Moveonly#
[src]

Attributes

  • Move-only

  • Standard-Layout

struct S#
[src]

Attributes

  • Aggregate

  • Hashable

  • Regular

  • Ordered (strong)

  • Standard-Layout

struct example

public:

int x = 42#
[src]

std::strong_ordering operator<=>(const S&) const = default#
[src]

Attributes

  • Constexpr

1.3 Functions (with all overloads)#

void example::test(const int*)#
[src]
void example::test(int*const)#
[src]
void example::test(const int***)#
[src]
void example::test(const int*const**)#
[src]

Deprecated

reason [4]

1.4 Types#

class example::My_sub_class final : public example::My_type#
[src]

Attributes

  • Copyable

  • Polymorphic

1.5 Variables#

template<auto X>
auto square = X * X#
[src]

Attributes

  • Constexpr

1static_assert(square<0> == 0);
2static_assert(square<1> == 1);
3static_assert(square<2> == 4);
4static_assert(square<3> == 9);

1.6 Macros#

MACRO_CONSTANT#
[src]
#define MACRO_CONSTANT 42

a simple macro constant

MORE_COMPLEX_MACRO(x, ...)#
[src]

a more complex macro function