www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11711] New: Add __traits(getAliasThis)

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711

           Summary: Add __traits(getAliasThis)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-12-07 23:15:46 PST ---
Currently, std.traits.XXXTypeOf is implemented in tricky. To fix the
complexity, I'd like to propose a new __trait.

alias Seq(T...) = T;
alias TypeTuple = Seq;

import std.typetuple;

struct S1
{
    string var;
    alias var this;
}
static assert(__traits(getAliasThis, S1) == TypeTuple!("var"));
// __traits(getAliasThis) returns a tuple of alias this member names
static assert(is(typeof(__traits(getMember, S1.init, __traits(getAliasThis,
S1)[0])) == string));
// Extract the alias this type by using the combination with
__traits(getMember).

struct S2
{
    TypeTuple!(int, string) var;
    alias var this;
}
static assert(__traits(getAliasThis, S2) == TypeTuple!("var"));
static assert(is(typeof(__traits(getMember, S2.init, __traits(getAliasThis,
S2)[0])) == TypeTuple!(int, string)));

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 07 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-12-09 01:09:59 PST ---
https://github.com/D-Programming-Language/dmd/pull/2939

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711



--- Comment #2 from github-bugzilla puremagic.com 2013-12-15 14:00:57 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/eee9e4e231aa0cac617da4ff3b19173f0eab4e22
fix Issue 11711 - Add __traits(getAliasThis)

https://github.com/D-Programming-Language/dmd/commit/06ff681ccd784c9729b21b96a695dce9c4f51809
Merge pull request #2939 from 9rnsr/fix11711

Issue 11711 - Add __traits(getAliasThis)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711



--- Comment #3 from github-bugzilla puremagic.com 2013-12-15 22:59:31 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/0e4843b4248af5f0e9dd0c84b7cfb9fc4c689f9e
fix Issue 11711 - Add __traits(getAliasThis)

https://github.com/D-Programming-Language/dlang.org/commit/5d336d5b2747e84b6612c08eca5fae619a58e324
Merge pull request #447 from 9rnsr/fix11711

Issue 11711 - Add __traits(getAliasThis)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711



--- Comment #4 from github-bugzilla puremagic.com 2013-12-19 05:47:39 PST ---
Commits pushed to 2.065 at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/0e4843b4248af5f0e9dd0c84b7cfb9fc4c689f9e
fix Issue 11711 - Add __traits(getAliasThis)

https://github.com/D-Programming-Language/dlang.org/commit/5d336d5b2747e84b6612c08eca5fae619a58e324
Merge pull request #447 from 9rnsr/fix11711

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 19 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11711



--- Comment #5 from github-bugzilla puremagic.com 2014-01-08 01:46:45 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/1d6e6356a03a8c3f771251d2d6a153a0cbff9c5b
Sync grammar of `TraitsKeyword` (issue 11711 fix)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 08 2014