D-Programming-Language/dmd — pull request #1362 by AndrejMitrovic (2012-12-10 17:56:14+00:00)
Title: Issue 9136 - Add isNested trait for aggregates and functions

http://d.puremagic.com/issues/show_bug.cgi?id=9136

This adds a new trait: `__traits(isNested, T)`, which is true for type T if it's a nested type which holds a context pointer (aggregate or function).

Current library workarounds require using `.stringof` tricks, which probably isn't very reliable. This pull simplifies implementation of Phobos [Pull 948](https://github.com/D-Programming-Language/phobos/pull/948/).