7 #if !defined(MQTT_BROKER_TOPIC_FILTER_TOKENIZER_HPP)
8 #define MQTT_BROKER_TOPIC_FILTER_TOKENIZER_HPP
17 static constexpr
char topic_filter_separator =
'/';
19 template<
typename Iterator,
typename Output>
21 auto pos = std::find(first, last, topic_filter_separator);
22 while (write(first, pos) && pos != last) {
23 first = std::next(pos);
24 pos = std::find(first, last, topic_filter_separator);
29 template<
typename Output>
34 [&write](string_view::const_iterator token_begin, string_view::const_iterator token_end) {
38 static_cast<std::size_t
>(std::distance(token_begin, token_end)))
#define MQTT_BROKER_NS_END
Definition: broker_namespace.hpp:22
#define MQTT_BROKER_NS_BEGIN
Definition: broker_namespace.hpp:21
boost::string_ref string_view
Definition: string_view.hpp:64
void topic_filter_tokenizer(Iterator first, Iterator last, Output write)
Definition: topic_filter_tokenizer.hpp:20