www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3829] New: ddoc of mixed in functions

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

           Summary: ddoc of mixed in functions
           Product: D
           Version: 2.040
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2010-02-18 12:44:53 PST ---
This code:
/// this is a ddoc comment
void foo(int i) { printf("%d\n", i); }
/// ditto
void foo(uint i) { printf("%d\n", i); }
/// ditto
void foo(short i) { printf("%d\n", i); }

Generates this correct HTML documentation:

void foo(int i);
void foo(uint i);
void foo(short i);
    this is a ddoc comment 


Then I have tried to generate those similar functions with a mixin(), but then
I can't find a way to make ddoc list them (into the generated Html) grouped:

/// this is a ddoc comment
void foo(int i) { printf("int) %d\n", i); }

template Gen(string type) {
    const Gen = `
    /// ditto
    void foo(` ~ type ~ ` i) { printf("` ~ type ~ `) %d\n", i); }`;
}

/// ditto
mixin(Gen!("uint"));

/// ditto
mixin(Gen!("short"));

void main() {
    foo(10);
    foo(cast(uint)20);
    foo(cast(short)30);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3829


Alexey Ivanov <aifgi90 gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aifgi90 gmail.com


--- Comment #1 from Alexey Ivanov <aifgi90 gmail.com> 2010-02-18 13:54:33 PST
---
See: http://d.puremagic.com/issues/show_bug.cgi?id=2420

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3829



--- Comment #2 from bearophile_hugs eml.cc 2010-02-18 14:57:05 PST ---
(In reply to comment #1)
 See: http://d.puremagic.com/issues/show_bug.cgi?id=2420
Yes, thank you, this seems a dupe. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 18 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3829


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |braddr puremagic.com
         Resolution|                            |DUPLICATE


--- Comment #3 from Brad Roberts <braddr puremagic.com> 2010-02-18 21:28:20 PST
---
If you find dupes, please mark them as such.. generally preferring to mark the
newest one as a dup of the oldest one.

*** This issue has been marked as a duplicate of issue 2420 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2010