Documentation work

This commit is contained in:
Vinnie Falco
2017-06-09 18:07:20 -07:00
parent d4ec693a61
commit 9d5d4d56a4
46 changed files with 1264 additions and 153 deletions
+34
View File
@@ -467,6 +467,19 @@ find(string_view name) const ->
return list_.iterator_to(*it);
}
template<class Allocator>
auto
basic_fields<Allocator>::
find(field name) const ->
iterator
{
auto const it = set_.find(
to_string(name), less{});
if(it == set_.end())
return list_.end();
return list_.iterator_to(*it);
}
template<class Allocator>
string_view const
basic_fields<Allocator>::
@@ -478,6 +491,17 @@ operator[](string_view name) const
return it->value();
}
template<class Allocator>
string_view const
basic_fields<Allocator>::
operator[](field name) const
{
auto const it = find(name);
if(it == end())
return {};
return it->value();
}
template<class Allocator>
void
basic_fields<Allocator>::
@@ -547,6 +571,16 @@ replace(string_view name, string_view value)
insert(name, value);
}
template<class Allocator>
void
basic_fields<Allocator>::
replace(field name, string_view value)
{
value = detail::trim(value);
erase(name);
insert(name, value);
}
//------------------------------------------------------------------------------
// Fields