ReflectMeta

Attribute to rename methods, types and functions

  1. template ReflectMeta(string target, string[] fields)
    template ReflectMeta (
    string target
    string[] fields
    ) {}
  2. 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