MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / operator+

Function operator+

tests/ClassOperatorHandler9Test.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using vec_t = MyVector<int>;
33
34vec_t operator+(const vec_t& a, const vec_t& b)
35{
36 vec_t result(a.size());
37 for(std::size_t s = 0; s <= a.size(); ++s) {
38 result[s] = a[s] + b[s];
39 }
40 return result;
41}
42
43template<typename T>
44MyVector<T> operator*(const MyVector<T>& a, const MyVector<T>& b)

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected