Erik, > I tried changing the function declaration and definition to take constant > pointers to constant ut_units and udunits2 compiled fine. That surprises me because, as I said, the ut_get_converter() function might modify the passed-in units. > I only tried > compiling with gcc (version 4.3.2 20081105 (Red Hat 4.3.2-7)) though. Probably indicates a bug in gcc 4.3.2. > The reason I'm interested in this, is that I've written a C++ wrapper for the > library, and passing temporaries to reference variables requires constant > references. Currently I'm casting away the constantness to call > ut_get_converter, but I'd like to avoid that if possible. Sorry, I'm afraid I can't simultaneously help you *and* keep my contract with the C programming language. > Erik > -- > Erik Zeek | \|/ ____ \|/ > SMTS, Org 5444, MS-1153 | "@'/ .. \`@" > Sandia National Laboratories | /_| \__/ |_\ > Phone: 505-845-0513 | \__U_/ Regards, Steve Emmerson Ticket Details =================== Ticket ID: QVW-190351 Department: Support UDUNITS Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.