[C++-sig] pyste and compressed_pair

Dmitriy Morozov python at foxcub.org
Sat Dec 20 21:01:36 CET 2008


Hi,

If I have the simplest header file that includes compressed_pair.hpp,
and I run pyste on it, pyste crashes complaining about is_abstract.hpp
included from compressed_pair.hpp. An example and error messages are
below. I was wondering if this was a known problem, and if there are
any workarounds. I'm trying this right now with Boost 1.36.0, but I
believe the same problem occurs with 1.37.0 (I tried it earlier).

Thanks in advance for your help.
Dmitriy

test.h:
#include <boost/compressed_pair.hpp>

struct A
{
    int a;
};

test.pyste:
Class("A", "test.h")

When running "pyste.py test.pyste" I get:

In file included from /usr/include/boost/type_traits/is_convertible.hpp:25,
                 from /usr/include/boost/type_traits/is_empty.hpp:12,
                 from /usr/include/boost/detail/compressed_pair.hpp:26,
                 from /usr/include/boost/compressed_pair.hpp:21,
                 from test.h:1:
/usr/include/boost/type_traits/is_abstract.hpp:72: error: expected
primary-expression before ')' token
/usr/include/boost/type_traits/is_abstract.hpp:72: error: a function
call cannot appear in a constant-expression
In file included from /usr/include/boost/type_traits/is_empty.hpp:19,
                 from /usr/include/boost/detail/compressed_pair.hpp:26,
                 from /usr/include/boost/compressed_pair.hpp:21,
                 from test.h:1:
/usr/include/boost/type_traits/is_class.hpp:122: error: expected
primary-expression before ')' token
/usr/include/boost/type_traits/is_class.hpp:122: error: a function
call cannot appear in a constant-expression
Traceback (most recent call last):
  File "/usr/bin/pyste.py", line 8, in <module>
    pyste.main()
  File "/usr/lib/python2.5/site-packages/Pyste/pyste.py", line 418, in main
    status = Begin()
  File "/usr/lib/python2.5/site-packages/Pyste/pyste.py", line 257, in Begin
    return GenerateCode(parser, module, out, interfaces, multiple)
  File "/usr/lib/python2.5/site-packages/Pyste/pyste.py", line 376, in
GenerateCode
    declarations, parsed_header = parser.Parse(header, interface, tail)
  File "/usr/lib/python2.5/site-packages/Pyste/CppParser.py", line 165, in Parse
    declarations = self.ParseWithGCCXML(header, tail)
  File "/usr/lib/python2.5/site-packages/Pyste/CppParser.py", line
126, in ParseWithGCCXML
    raise CppParserError, 'Error executing gccxml'
Pyste.CppParser.CppParserError: Error executing gccxml


More information about the Cplusplus-sig mailing list