X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d372483508bbd9164c5492148fdfb847348669de..3297da9f47ce18371941b2b48a2f4018b4793ced:/include/xbt/range.hpp diff --git a/include/xbt/range.hpp b/include/xbt/range.hpp index 7e13722b51..08e659fa47 100644 --- a/include/xbt/range.hpp +++ b/include/xbt/range.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016. The SimGrid Team. +/* Copyright (c) 2016-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,13 +11,13 @@ namespace simgrid { namespace xbt { /** Describes a contiguous inclusive-exclusive [a,b) range of values */ -template class range { +template class Range { T begin_; T end_; public: - range() : begin_(), end_() {} - range(T begin, T end) : begin_(std::move(begin)), end_(std::move(end)) {} - range(T value) : begin_(value), end_(value + 1) {} + Range() : begin_(), end_() {} + Range(T begin, T end) : begin_(std::move(begin)), end_(std::move(end)) {} + explicit Range(T value) : begin_(value), end_(value + 1) {} T& begin() { return begin_; } T& end() { return end_; } const T& begin() const { return begin_; }