From 8bf97d8a0019ffad338795031ad9a0477de926fd Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 2 Dec 2018 23:04:49 +0900 Subject: [PATCH] add constructors that receive range to region --- toml/region.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toml/region.hpp b/toml/region.hpp index a96ba03..df97f0d 100644 --- a/toml/region.hpp +++ b/toml/region.hpp @@ -50,6 +50,15 @@ struct region source(std::move(loc.source)) {} + region(const location& loc, const_iterator f, const_iterator l) + : begin(loc.begin), first(f), last(l), end(loc.end), + source(loc.source) + {} + region(location&& loc, const_iterator f, const_iterator l) + : begin(loc.begin), first(f), last(l), end(loc.end), + source(std::move(loc.source)) + {} + region(const region&) = default; region(region&&) = default; region& operator=(const region&) = default;