test namespace

A namespace.

More info. Here's some C++:

int foo()
{
    return 42_a_numeric_udl;
}

        // code block formatting should be preserved;
            // this line should be indented by three tabs, the above by two.

const char* bar() noexcept
{
    return ""_a_string_udl;
}

using some_typedef = int; // 'some_typedef' should be coloured as a type

template <typename T>
using templated_typedef = int; // 'T' and 'templated_typedef' should be coloured as types

class qux
{
    static int func();
    static bool func2(int);
    static void func3();

    qux()
    {
        func();

        if (func2(7))
        {
            qux::func3();
        }
    }
};
this should be a .sh block.
    each line should be indended by one more tab than the last.
        i have put the block openers and closers right next to each other
            without a blank line in between because this breaks parsing in m.css
                but poxy has a fix for it.
                    additionally it should appear 'glued' to the above C++ block, because magic.

Namespaces

namespace empty
An empty namespace.
namespace nested
Another namespace.

Classes

class class_1
A class.
struct struct_1
A struct.
template<typename T>
class template_class_1
A template class.

Concepts

template<typename T>
concept concept_1
A concept.

Enums

enum class scoped_enum: unsigned { val_0, val_1 = 1, val_2 = 2 }
A C++11 scoped enum.
enum unscoped_enum { LEGACY_ENUM_VAL_0, LEGACY_ENUM_VAL_1 = 1, LEGACY_ENUM_VAL_2 = 2 }
A pre-C++11 unscoped enum.

Typedefs

using a_shit_typedef = int
An old-school typedef.
using a_typedef = int
A C++11 'using' typedef.
template<typename T>
using a_typedef_template = T
A C++11 'using' typedef template.

Functions

void a_friend_function()
A function that appears as a friend to a test::class_1.
template<typename T, typename U>
auto do_the_other_thing(U u) -> T constexpr noexcept
A function template.
auto do_the_thing() -> std::uint8_t
A function.
auto do_the_thing_automatically() -> int
A function with a trailing return type.

Variables

bool inline_variable constexpr
An inline variable.

Enum documentation

enum class test::scoped_enum: unsigned
#include <src/code.h>

A C++11 scoped enum.

More info.

Enumerators
val_0

Value zero.

val_1

Value one.

val_2

Value two.

enum test::unscoped_enum
#include <src/code.h>

A pre-C++11 unscoped enum.

More info.

Enumerators
LEGACY_ENUM_VAL_0

Value zero.

LEGACY_ENUM_VAL_1

Value one.

LEGACY_ENUM_VAL_2

Value two.

Typedef documentation

typedef int test::a_shit_typedef
#include <src/code.h>

An old-school typedef.

More info.

using test::a_typedef = int
#include <src/code.h>

A C++11 'using' typedef.

More info.

#include <src/code.h>
template<typename T>
using test::a_typedef_template = T

A C++11 'using' typedef template.

More info.

Function documentation

void test::a_friend_function()
#include <src/code.h>

A function that appears as a friend to a test::class_1.

More info.

#include <src/code.h>
template<typename T, typename U>
T test::do_the_other_thing(U u) constexpr noexcept

A function template.

Template parameters
T A type.
U Another type.
Parameters
u An argument.
Returns A T.

More info.

std::uint8_t test::do_the_thing()
#include <src/code.h>

A function.

More info.

int test::do_the_thing_automatically()
#include <src/code.h>

A function with a trailing return type.

More info.

Variable documentation

bool test::inline_variable constexpr
#include <src/code.h>

An inline variable.

More info.