добавил const для части контейнеров и explicit для конструкторов
This commit is contained in:
@@ -54,11 +54,18 @@ public:
|
||||
|
||||
//! \~english Constructs PIPair from [std::tuple](https://en.cppreference.com/w/cpp/utility/tuple).
|
||||
//! \~russian Создает PIPair из [std::tuple](https://ru.cppreference.com/w/cpp/utility/tuple).
|
||||
PIPair(std::tuple<Type0, Type1> tuple) {
|
||||
explicit PIPair(std::tuple<Type0, Type1> tuple) {
|
||||
first = std::get<0>(tuple);
|
||||
second = std::get<1>(tuple);
|
||||
}
|
||||
|
||||
//! \~english Constructs PIPair from [std::pair](https://en.cppreference.com/w/cpp/utility/pair).
|
||||
//! \~russian Создает PIPair из [std::pair](https://ru.cppreference.com/w/cpp/utility/pair).
|
||||
explicit PIPair(std::pair<Type0, Type1> pair) {
|
||||
first = pair.first;
|
||||
second = pair.second;
|
||||
}
|
||||
|
||||
//! \~english Constructs PIPair from values `value0` and `value1`.
|
||||
//! \~russian Создает PIPair из `value0` и `value1`.
|
||||
PIPair(const Type0 & value0, const Type1 & value1) {
|
||||
|
||||
Reference in New Issue
Block a user