mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Explicity disallow get_idx for boolean type, to avoid ambiguity with a map.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace YAML
|
||||
};
|
||||
|
||||
template<typename Key>
|
||||
struct get_idx<Key, typename boost::enable_if<boost::is_unsigned<Key> >::type> {
|
||||
struct get_idx<Key, typename boost::enable_if_c<boost::is_unsigned<Key>::value && !boost::is_same<Key, bool>::value>::type> {
|
||||
static node *get(const std::vector<node *>& sequence, const Key& key, shared_memory_holder /* pMemory */) {
|
||||
return key < sequence.size() ? sequence[key] : 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user