May 12, 2022 Issues » [Issue 23105] `__trait(getMember)` and `mixin()` of the same code as a string behave differently | |||
|---|---|---|---|
| |||
...traits(getMember, sym, m)`;
template test(alias sym)
{
static foreach (m; __traits(allMembers, sym))
{
static... | |||
May 12, 2022 Issues » [Issue 23105] New: `__trait(getMember)` and `mixin()` of the same code as a string behaves differently | |||
|---|---|---|---|
| |||
...traits(getMember, sym, m)`;
template test(alias sym)
{
static foreach (m; __traits(allMembers, sym))
{
static... | |||
May 12, 2022 Issues » [Issue 23104] case where use of mixin() is rejected but use of the mixin content as code is not | |||
|---|---|---|---|
| |||
...succeeds only depending on is(mixin(getMember)==module VS is(__traits(getMember, sym, m)==module -- | |||
May 12, 2022 Issues » [Issue 23104] New: case where use of mixin() is rejected but use of the mixin content as code does | |||
|---|---|---|---|
| |||
...traits(getMember, sym, m)`;
template printMembers(alias sym)
{
static foreach (m; __traits(allMembers, sym))
{
pragma... | |||
May 03, 2022 Learn » Re: How to get compatible symbol names and runtime typeid names for templated classes? | |||
|---|---|---|---|
| |||
...enum sym = fullyQualifiedName!SYM;
if (sym !in serialTypes) {
auto st = new SerialType!SYM;
serialTypes[sym... | |||
March 22, 2022 Learn » Determining function template from runtime type: better ideas? | |||
|---|---|---|---|
| |||
...SYM; getSymbolsByUDA!(MODULE, Serializable)) static if (is(SYM == class)) serialTypes[fullyQualifiedName!SYM] = new SerialType!SYM... | |||
February 25, 2022 Learn » Re: How to check that a member function is generated by compiler? | |||
|---|---|---|---|
| |||
...traits(getMember, A, sym)) == function),",",
typeof(__traits(getMember, A, sym)).stringof,",",sym);
// pure nothrow @nogc... | |||
February 25, 2022 Learn » How to check that a member function is generated by compiler? | |||
|---|---|---|---|
| |||
...int b;
}
static foreach(sym; __traits(allMembers, A))
pragma(msg,sym);
```
prints
```
b
opAssign
```
How... | |||
September 30, 2021 General » [core.reflect] TemplateInstance reflection | |||
|---|---|---|---|
| |||
...4,
identifier: "TypeDef!("myInt", int)",
_unqualified: null,
sym: StructDeclaration = {
internalPointer: unhandled,
serial: 31544,
astTypeName: "StructDeclaration... | |||
September 21, 2021 General » Getting the names of all the top-level functions in module | |||
|---|---|---|---|
| |||
...derivedMembers, M))
{
alias sym = __traits(getMember, M, m);
static if (is(typeof(sym) T) && is... | |||
Copyright © 1999-2021 by the D Language Foundation