[GCC-XML] Failed to compile pimpl idiom with up to date gccxml and boost's scoped_ptr

Roman Yakovenko roman.yakovenko at gmail.com
Tue Jan 6 16:59:42 EST 2009


On Tue, Jan 6, 2009 at 12:42 AM, Roman Yakovenko
<roman.yakovenko at gmail.com> wrote:
> No, I don't have a small example :-(. Let me investigate this and I
> will come back to you tomorrow.

Hi Brad.

Unfortunately, I was not able to create small example, which reproduce
the problem. So I extracted the problematic case from the tester:

>>>code<<<

#include <map>
#include <string>
struct instantiate_tmpls{
    instantiate_tmpls() : ms() {}
    std::multimap< std::string, std::string > ms;
};
typedef std::multimap< std::string, std::string > s2s_multimap_type;

>>>code end<<<

Previous build generates the following members
<Class id="_19" members="_1392 _1393 _1394 _1395 _1396 _1398 _1399
_1400 _1401 _1403 _1405 _1407 _1409 _1411 _1413 _1414 _1415 _1416
_1417 _1418 _1419 _1420 _1421 _1422 _1423 _1424 " bases="_1182 ">

while the new one:

<Class id="_19" members="_1392 _1393 _1394 _1395 _1396 _1398 _1399
_1400 _1401 _1403 _1405 _1407 _1409 _1411 _1413 _1414 _1415 _1416
_1417 _1418 _1419 _1420 _1421 _1422 " bases="_1182 ">

As you can see, it doesn't dump 2 members. This is copy constructor
and operator=.

The interesting part, the test fails on Windows MSVC 9.0, SP1 and
passes on Linux. I investigated MSVC source code and found
* multimap doesn't have copy constructor ( I didn't look for operator= )
* it derives(public) from class _Tree and class _Tree do have copy constructor.

I don't know, what standard says, but I definitely could copy
std::multimap class instances, so I guess copy constructor should be
presented in the output. But as I said - I could be wrong here.

HTH

P.S. I am going to sleep ( it's a must :-) ), let me know if you need
more information\help

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the gccxml mailing list