This is the mail archive of the gcc-bugs@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]

[Bug c++/13658] [testcase] namespace association vs. templates part one


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-02 00:51 -------
Subject: Re:  [testcase] namespace association vs. templates part one

"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:

| Can't you just declare the wrong swap() and define the correct (specialized) 
| swap(), and dg-link the testcase?

I've just posted the following testcase

   #include <vector>

   struct foo { };

   namespace std {
     template<>
       struct vector<foo> {
         // no member
       };
   }

   int main()
   {
      std::vector<foo> a;
      std::vector<foo> b;
      std::swap(a, b);          // ERROR 
   }

The test fails if there is no error.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13658


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