Skip to content

Commit 42f992f

Browse files
[ADT] Teach SmallSetVector to inherit constructors (NFC) (#155788)
This patch teaches SmallSetVector to inherit constructors from the base class with "using". This way, we can remove all of the manually defined constructors in SmallSetVector.
1 parent c62a5bf commit 42f992f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

llvm/include/llvm/ADT/SetVector.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -377,17 +377,7 @@ class SetVector {
377377
template <typename T, unsigned N>
378378
class SmallSetVector : public SetVector<T, SmallVector<T, N>, DenseSet<T>, N> {
379379
public:
380-
SmallSetVector() = default;
381-
382-
/// Initialize a SmallSetVector with a range of elements
383-
template<typename It>
384-
SmallSetVector(It Start, It End) {
385-
this->insert(Start, End);
386-
}
387-
388-
template <typename Range>
389-
SmallSetVector(llvm::from_range_t, Range &&R)
390-
: SmallSetVector(adl_begin(R), adl_end(R)) {}
380+
using SetVector<T, SmallVector<T, N>, DenseSet<T>, N>::SetVector;
391381
};
392382

393383
} // end namespace llvm

0 commit comments

Comments
 (0)