[C++-sig] export a constant
David Abrahams
david.abrahams at rcn.com
Wed May 22 18:10:31 CEST 2002
----- Original Message -----
From: "Scott A. Smith" <ssmith at magnet.fsu.edu>
> const double PLANK = 6.6260755e-34; // Plancks constant (h)(J-sec)
>
> Is there a way to just export this using Boost.Python so that
> in Python I can just do
>
> h = PLANK
In Boost.Python v1, you can do:
#include <boost/python/reference.hpp>
my_module_builder.add(make_ref(PLANK), "PLANK");
More information about the Cplusplus-sig
mailing list