Boost logo

Boost Testing :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-07-03 09:44:27


On Jul 3, 2006, at 9:43 AM, Jeff Garland wrote:

> Douglas Gregor wrote:
>> Steve,
>> I'm CC'ing you on this discussion because it looks like a name
>> mangling bug in the latest Sun C++ compiler. The linker produces
>> this error message:
>>
>> ...snip detail...
> >
>> The problem is that the compiler is putting "const" into the
>> mangled name for the definition, but it shouldn't be there.
>> Jeff, it looks like you can work around this bug by removing
>> "const" from "const int ele" in src/gregorian/date_generators.cpp.
>
> Thanks for the analysis Doug. It looks like there is actually a
> mismatch between the declaration in boost/date_time/
> date_generators.hpp and the .cpp
>
> //date_generators.hpp
> //! Returns nth arg as string. 1 -> "first", 2 -> "second", max
> is 5.
> BOOST_DATE_TIME_DECL const char* nth_as_str(int n);
>
> //date_generators.cpp
> BOOST_DATE_TIME_DECL const char* nth_as_str(const int ele)
>
>
> I'm surprised that's working on any compilers -- looks like the
> other compilers are being a bit lax on signature matching. I'm
> fixing now.

IIRC, top-level cv-qualifiers on argument types are dropped, so I
believe your code is correct. It just happens to poke at one
particular corner case.

        Doug


Boost-testing list run by mbergal at meta-comm.com