Ticket #5710 (closed Bugs: fixed)

Opened 6 years ago

Last modified 5 years ago

ptree::sort() compilation error

Reported by: bolero.murakami+cpp@… Owned by: cornedbee
Milestone: To Be Determined Component: property_tree
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:


It is an error code:

boost::property_tree::ptree pt;

Output (VC9):

c:\program files\microsoft visual studio 9.0\vc\include\utility(103) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'const boost::property_tree::basic_ptree<Key,Data>'
        c:\program files\microsoft visual studio 9.0\vc\include\string(150) : see declaration of 'std::operator <'
        c:\program files\microsoft visual studio 9.0\vc\include\functional(143) : see reference to class template instantiation 'bool std::operator <<const Key,boost::property_tree::basic_ptree<Key,Data>>(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' being compiled
            _Ty1=const std::string,
        c:\program files\microsoft visual studio 9.0\vc\include\functional(142): while compiling class template member function 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' being compiled
            _Ty=std::pair<const std::string,boost::property_tree::basic_ptree<std::string,std::string>>

No-argument ptree::sort() in the element less<pair<const string, ptree> > to be compared by.

However, this comparison operators are not defined. Therefore be a compilation error.

I think, the no-argument ptree::sort() should implemented by a comparison of key strings.


Change History

comment:1 Changed 5 years ago by cornedbee

  • Status changed from new to closed
  • Resolution set to fixed

(In [76447]) Merge [72000],[72001],[72003], [74691], [75587], [75589], [75590], and [75593] from trunk. Fixes bug 4840. Fixes bug 5259. Fixes bug 5281, I think. Fixes bug 5944. Fixes bug 5757. Fixes bug 5710. Fixes bug 5307, I think.

comment:2 Changed 5 years ago by anonymous

I have this problem with Boost 1.48.0. Was this really fixed?

comment:3 Changed 5 years ago by cornedbee

I changed it to fixed 5 days ago. 1.48 was released two months ago. Do the math.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.