[C++-sig] Re: Boost.Python unnamed enums at global scope

David Abrahams dave at boost-consulting.com
Sat Aug 2 22:21:40 CEST 2003

Hi Niall,

Please post Boost.Python questions to the C++-sig (see

"Niall Douglas" <ned at nedprod.com> writes:

> Hi,
> I was wondering if Boost.Python could be extended such that:
> enum_<int>("").value("CONST", CONST);
> .. would place its members in the highest scope possible ie; you'd 
> access it as my_module.CONST.

We have an export_values() member function which accomplishes that.

> I suggest this because the library I'm creating bindings for has 
> loads of unnamed enums at global scope for creating constants and 
> sticking them in some "unnamed" scope is counter-intuitive. Since 
> pyste has to deal with these, it creates problems :(

If you're using Pyste, you *really* should post this to the C++-sig,
since Nicodemus (the Pyste author) doesn't read my emails.

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list