diff options
| author | Evgeny Grechnikov <[email protected]> | 2022-02-22 19:30:28 +0300 | 
|---|---|---|
| committer | Evgeny Grechnikov <[email protected]> | 2022-02-22 19:30:28 +0300 | 
| commit | 958ccb82c78a47b450486423eddaffed6c2e69de (patch) | |
| tree | 18d40b575d0fb5fa3392920a8312b7c33338899f /library/cpp/cache | |
| parent | 16bef245781f24c63adf7d00d040068ce628ffff (diff) | |
make constructor explicit
ref:d37b0645d455208e882d5fbf3895e527328601c3
Diffstat (limited to 'library/cpp/cache')
| -rw-r--r-- | library/cpp/cache/cache.h | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/cache/cache.h b/library/cpp/cache/cache.h index 22075fd94f2..6f496305e27 100644 --- a/library/cpp/cache/cache.h +++ b/library/cpp/cache/cache.h @@ -30,15 +30,15 @@ public:  public:      struct TItem: public TIntrusiveListItem<TItem> {          typedef TIntrusiveListItem<TItem> TBase; -        // universal reference for TKey here prevents TItem(TItem&) from compiling, +        // universal reference for TKey here prevents TItem(/*non-const*/ TItem&) from compiling,          // so explicitly specify const TKey& and TKey&& -        TItem(const TKey& key) +        explicit TItem(const TKey& key)              : TBase()              , Key(key)              , Value()          {          } -        TItem(TKey&& key) +        explicit TItem(TKey&& key)              : TBase()              , Key(std::move(key))              , Value() @@ -295,13 +295,13 @@ public:      }      struct TItem { -        TItem(const TKey& key) +        explicit TItem(const TKey& key)              : Key(key)              , Value()              , Weight(TWeighter::Weight(Value))          {          } -        TItem(TKey&& key) +        explicit TItem(TKey&& key)              : Key(std::move(key))              , Value()              , Weight(TWeighter::Weight(Value))  | 
