1 UCPP-Doc Example#

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

1.1 Example code-blocks#

Extracted from second_example.hpp

1// Let:
2example::My_type & x = ...;
3
4example::my_typedef rt = x.method<43>();
5return 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]

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

int test_auto()#
[src]

auto

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

auto&

int test_auto_decltype(int& i)#
[src]

decltype(auto)

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(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]

Doc-String about f1 overload-set

with multiple

lines

  1. Comment about the float-overload, specifically.

  2. two parameters

Parameters:
  • x – X_DESCR

  • y – Y_DESCR [3]

Returns:

RET_DESCR

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

  • C – thrown by all overloads

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

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

some template

Template Parameters:

Ts – template parameter

Parameters:

ts – value parameter

Returns:

return value

TODO

something that still needs doing

another normal paragraph

indentation test

A reference to an external project glfwInit()

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

class My_type#
[src]

Attributes

  • Abstract

  • Copyable

  • Polymorphic

a class

public:

My_type(int)#
[src]

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

Requirements

  • N > 42

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

  • Aggregate

  • 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

  • Polymorphic

  • Semi-Regular

protected:

int foo() override#
[src]

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