16 #include <unordered_map> 17 #include <initializer_list> 27 using db_type = std::unordered_map<std::string, std::string>;
28 using value_type = db_type::value_type;
33 std::string
get(
const std::string& id);
37 virtual void insert(
const value_type& value);
40 template <
class InputIt>
41 std::enable_if_t<std::is_convertible<decltype(*std::declval<InputIt>()), value_type>::value>
44 std::for_each(first, last, [
this](
const value_type& p) ->
void {
insert(p); });
48 template <
class Range>
49 std::enable_if_t<std::is_convertible<decltype(*std::cbegin(std::declval<Range>())), value_type>::value>
56 void insert(
const std::initializer_list<value_type>& ilist)
std::enable_if_t< std::is_convertible< decltype(*std::declval< InputIt >)), value_type >::value > insert_range(InputIt first, InputIt last)
Add kernel sources to the DB.
void insert(const std::initializer_list< value_type > &ilist)
Add kernel sources to the DB.
Helper class to store kernel sources.
virtual void insert(const value_type &value)
Add kernel source to the DB.
std::enable_if_t< std::is_convertible< decltype(*std::cbegin(std::declval< Range >))), value_type >::value > insert(const Range &range)
Add kernel sources to the DB.