Boost logo

Boost :

Subject: [boost] [property_tree] Primitive types for data not supported?
From: Boris Schaeling (boris_at_[hidden])
Date: 2011-09-25 12:18:23

I just noticed that Boost.PropertyTree doesn't support primitive types for
data (Boost 1.47.0). For example, this doesn't compile:

boost::property_tree::basic_ptree<std::string, int> pt, pt2;

The reason is this code in

template<class K, class D, class C> inline
void basic_ptree<K, D, C>::swap(basic_ptree<K, D, C> &rhs)
   // Void pointers, no ADL necessary
   std::swap(m_children, rhs.m_children);

Primitive types like int obviously don't have a member function swap(). Is
this an oversight or are primitive types intentionally not supported?


Boost list run by bdawes at, gregod at, cpdaniel at, john at