Closed GoogleCodeExporter closed 8 years ago
yaml-cpp used to have this. See Issue 150 for some reasons, and discussion
about this. The short version: there's ambiguity with operator bool().
I've started coming around to something like this:
{{{
Node node = Load("[4, 7]");
int x = node[0].as<int>();
int y = node[1]();
}}}
The idea is that operator() returns a fake object that has a templated
conversion method.
Original comment by jbe...@gmail.com
on 6 Jun 2014 at 9:28
[deleted comment]
Original comment by jbe...@gmail.com
on 24 Jan 2015 at 11:26
Original issue reported on code.google.com by
tr...@houliston.me
on 6 Jun 2014 at 8:53Attachments: