MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / set

Method set

common/unordered_inline_set.h:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 }
74 template<typename X>
75 void set(size_t i, X&& x) {
76 assert(i < _capacity);
77 if (get_bit(i)) {
78 _ptr[i] = std::forward<X>(x);
79 } else {
80 new (_ptr + i) T(std::forward<X>(x));
81 set_bit(i);
82 _size++;
83 }
84 }
85 template<typename...Xs>
86 void emplace(size_t i, Xs&&...xs) {
87 assert(i < _capacity);

Callers 2

setMethod · 0.45
insertMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected