Commit f5418306 authored by Jesse Beder's avatar Jesse Beder
Browse files

Explicity disallow get_idx for boolean type, to avoid ambiguity with a map.

parent 04937649
...@@ -22,7 +22,7 @@ namespace YAML ...@@ -22,7 +22,7 @@ namespace YAML
}; };
template<typename Key> 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 */) { static node *get(const std::vector<node *>& sequence, const Key& key, shared_memory_holder /* pMemory */) {
return key < sequence.size() ? sequence[key] : 0; return key < sequence.size() ? sequence[key] : 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment