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

           Summary: back() and front() with ref return + opSlice() in
                    sort() constraint
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-19 07:23:14 PST ---
With some experiments I have seen that the input of std.algorithm.sort() has
other requirements beside being just a random access range (dmd 2.052):
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=24795

My experiment shows that beside being a random access range, the input range
needs also:
- opSlice()
- back() and front() must return their results by ref.

So to reduce troubles for the users I suggest to add those three requirements
inside the template constraint of sort(), to produce a better error message and
detect problems more early.

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

Reply via email to