The OpenD Programming Language

ReflectMeta

Attribute to rename methods, types and functions

template ReflectMeta (
string target
string[] fields
) {}

Members

Structs

ReflectMeta
struct ReflectMeta(Args...)

Examples

enum E { A, B, C }

struct S
{
    int a;
    @reflectMeta!("c++", ["type"])(E.C)
    int b;
}

import std.traits: hasUDA;

alias CppMeta = ReflectMeta!("c++", ["type"]);

static assert(CppMeta!E(E.C).type == E.C);
static assert(!hasUDA!(S.a, CppMeta!E(E.A)));
static assert(hasUDA!(S.b, CppMeta!E(E.C)));

Meta