[Libpqxx-general] from_string to const string, was: <no subject>

Daniel Frey d.frey at gmx.de
Tue Apr 28 15:41:30 UTC 2009


Hi Jeroen,

On 28.04.2009, at 15:29, Jeroen Vermeulen wrote:

> Robert Barnett wrote:
>>
>> I have a strange issue when compiling this program. I try to copy a
>> field into a const std::string but I don't get a compiler error.
>> Instead I get a crpytic linker error.
>
>> Shouldn't this be evident at an earlier stage?
>
> You're right, that would be helpful.  I just added a specialization  
> for
> const string in revision [1519].  Could you try it with that?

May I suggest to add an empty definition for string_traits? Just:

template<typename T> struct string_traits {};

in strconv.hxx line 46. That way, it always fails at compile-time  
instead of link-time when used with a type that has no specialization.

Regards, Daniel



More information about the Libpqxx-general mailing list