X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..f653eea6a35035be81a9b60f6c2fa7c48292d9c4:/include/xbt/range.hpp diff --git a/include/xbt/range.hpp b/include/xbt/range.hpp index 5c20a9c866..ffe716081c 100644 --- a/include/xbt/range.hpp +++ b/include/xbt/range.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016. The SimGrid Team. +/* Copyright (c) 2016-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -7,6 +7,8 @@ #ifndef SIMGRID_XBT_RANGE_HPP #define SIMGRID_XBT_RANGE_HPP +#include + namespace simgrid { namespace xbt { @@ -17,7 +19,7 @@ template class Range { 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) {} + explicit Range(T value) : begin_(value), end_(value + 1) {} T& begin() { return begin_; } T& end() { return end_; } const T& begin() const { return begin_; }