|
Boost : |
Subject: [boost] property tree find no match for 'operator=='
From: Bernd Prager (bernd_at_[hidden])
Date: 2011-09-30 13:17:33
All,
This is likely to be a silly question.
I am trying to check for the existence of a value in a property tree.
Reading the docs I assumed the easiest way would be:
namespace pt = boost::property_tree;
static pt::ptree pt;
bool has(const std::string key) {
if (pt.find(key) == pt.end()) return false; // (1)
return true;
}
The compiler complains about "error: no match for 'operator=='" in line
(1) though.
What am I missing?
Thank you for any help,
-- Bernd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk