This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2017-10-11 09:48:27 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <boost/variant/apply_visitor.hpp>
|
2017-10-17 10:29:56 -04:00
|
|
|
#include <string>
|
2017-10-11 09:48:27 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
namespace mstch
|
|
|
|
|
{
|
2017-10-11 09:48:27 -04:00
|
|
|
|
|
|
|
|
using citer = std::string::const_iterator;
|
|
|
|
|
using criter = std::string::const_reverse_iterator;
|
|
|
|
|
|
|
|
|
|
citer first_not_ws(citer begin, citer end);
|
|
|
|
|
citer first_not_ws(criter begin, criter end);
|
2017-10-17 10:29:56 -04:00
|
|
|
std::string html_escape(const std::string &str);
|
2017-10-11 09:48:27 -04:00
|
|
|
criter reverse(citer it);
|
|
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
template <class... Args> auto visit(Args &&... args) -> decltype(boost::apply_visitor(std::forward<Args>(args)...))
|
2017-10-11 09:48:27 -04:00
|
|
|
{
|
|
|
|
|
return boost::apply_visitor(std::forward<Args>(args)...);
|
|
|
|
|
}
|
|
|
|
|
}
|