This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using incomplete types to instantiate STL-Templates?


Wolfgang Bangerth <bangerth@ices.utexas.edu> writes:

| > | I think that's weird, and 
| > | personally consider it a defect in the way the concepts checks are 
| > | implemented. 
| > 
| > STL concepts  checking in pure C++ is a tough task.  I would be pleased to
| > read your implementations :-)
| 
| Fair enough. I didn't imply any blame in my wording -- heck, all my job in 
| gcc is pointing out errors in some part of gcc or other ;-) If I had to 
| fix them all, I'd have a problem...

Well, I see my comments many be read to be rude.  I didn't intend that.

What I wanted to convey is that it is as using pure C++ to check STL
concepts is as easy as it might appear at first sight (I believe
Jeremy Siek did many re-designs).  

| What I thought is that deferring concepts check to the time we actually 
| instantiate an object might be done by placing the check machinery into 
| the constructors, since that's the first place we end up in anyway.

I suspect that would be insufficient to ensure that we don't end up with
unprintable self-references (which might send a constructor into
infinite loop).  The completness requirement is an attempt to catch
such circumstances.  That doesn't mean I would not like to see

   struct Person {
      std::string               name;
      std::list<Person>         children;
     // ...
   };

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]