nixos/packages/biu/test/format.cpp

16 lines
260 B
C++
Raw Permalink Normal View History

2024-08-23 09:31:33 +08:00
# include <biu.hpp>
int main()
{
using namespace biu::literals;
std::optional<int> a = 3;
std::cout << "{}\n"_f(a);
auto b = "hello"s;
auto c = "h(ell)o"_re;
std::smatch d;
assert(std::regex_match(b, d, c));
assert("{}"_f(d[1]) == "ell");
2024-08-23 09:31:33 +08:00
}