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


bearophile_h...@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_h...@eml.cc


--- Comment #4 from bearophile_h...@eml.cc 2010-08-27 16:26:55 PDT ---
Time ago some people have proposed to allow "private" for that purpose:

template isNumeric(T) {
    private enum bool test1 = is(T : long);
    private enum bool test2 = is(T : real);
    enum bool isNumeric = test1 || test2;
}


This is good because the person that reads the code doesn't need to remember
the rule that test1 and test2 become invisible if isNumeric is defined inside
isNumeric(). So I think this is a more tidy solution to the problem.

On the other hand you want all names to be private but the one that is
eponymous, so the solution in TDPL is shorter (and probably acceptable still).

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

Reply via email to