www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6967] New: template instantiation depends an pragma(msg, T.stringof) if __traits is used

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

           Summary: template instantiation depends an pragma(msg,
                    T.stringof) if __traits is used
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tobias pankrath.net



PST ---
From a thread in d.learn:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/Strange_behaviour_in_templates_Another_bug_30591.html


I'm trying to learn template meta programming in D. To do this, I'm working
on a  meta state machine like Boost.MSM 
(http://www.boost.org/doc/libs/1_47_0/libs/msm/doc/HTML/index.html).

States are types and can have sub states. If they do, they need to have
an attribut 'SubStates', which should be a TypeTuble with the 
sub states.

The task at hand is: Given a State and a list of all States, create
a list of all parents of State including State itself.

This code (http://paste.pocoo.org/show/506154/) ought to do this
and it works sometimes. 

You can make to interesting observations of this code:

In its current form, 'dmd test.d -unittest' will print: "
 false
But if you uncomment the first pragma() in the unittest block, it will print 
 () 
 true
If you change the body of ParentsDesc to 
 alias TypeTuple!() Result;
it will also print
 true
Although the static if in ParentsDesc is never true in this example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 17 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6967


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

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



The code (http://paste.pocoo.org/show/506154/) had disappears, so we cannot
know what was the original issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 12 2012