// file : butl/prefix-map.txx -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file namespace butl { template auto prefix_map_common:: find_prefix (const key_type& k) -> std::pair { std::pair r; r.first = this->lower_bound (k); for (r.second = r.first; r.second != this->end (); ++r.second) { if (!this->key_comp ().prefix (k, r.second->first)) break; } return r; } template auto prefix_map_common:: find_prefix (const key_type& k) const -> std::pair { std::pair r; r.first = this->lower_bound (k); for (r.second = r.first; r.second != this->end (); ++r.second) { if (!this->key_comp ().prefix (k, r.second->first)) break; } return r; } }