Boost logo

Boost Users :

Subject: Re: [Boost-users] [Users][Property Tree] Problem with compiling basic_tree<std::string, ...>
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-07-11 14:07:32


On 07/11/2010 06:24 AM, Jani Plesnicar wrote:
> Hy i have problem with
>
> class DataHold
> {
> public:
> const DataHold& DataHold::operator=(const DataHold& oth)
> {
> return oth;
> }
>
> private:
> friend class property_tree::basic_ptree<std::string,DataHold>;
>
> };
>
>
> namespace prop_tree {
> typedef property_tree::basic_ptree<std::string,DataHold> ptreedh;
> };
>
>
> I get these errors in Visual Studio C++ 2008 when trying to compile.
> 1>------ Build started: Project: DebugServerLib, Configuration: Debug
> Win32 ------
> 1>Compiling...
> 1>main.cpp
> 1>p:\cpp\boost\include\boost-1_42\boost\property_tree\detail\ptree_implementation.hpp(655)
> : error C2027: use of undefined type
> 'boost::property_tree::translator_between<Internal,External>'
> 1> with
> 1> [
> 1> Internal=DataHold,
> 1>
> External=std::basic_string<char,std::char_traits<char>,std::allocator<char>>
> 1> ]
You will have to specialize translator_between for your relevant types.
For the record, property_tree is pretty bad at storing values that are
not representable as strings.

Sebastian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net