add constructors that receive range to region

This commit is contained in:
ToruNiina
2018-12-02 23:04:49 +09:00
parent 2ee8ffab21
commit 8bf97d8a00

View File

@@ -50,6 +50,15 @@ struct region
source(std::move(loc.source))
{}
region(const location<Container>& loc, const_iterator f, const_iterator l)
: begin(loc.begin), first(f), last(l), end(loc.end),
source(loc.source)
{}
region(location<Container>&& 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;