MCPcopy Create free account
hub / github.com/bytedance/bolt / create

Method create

bolt/type/Type.cpp:1209–1225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1207class FunctionParametricType {
1208 public:
1209 static TypePtr create(
1210 const std::vector<TypeParameter>& parameters,
1211 [[maybe_unused]] std::vector<std::string> rowParameterNames) {
1212 BOLT_USER_CHECK_GE(parameters.size(), 1);
1213 for (const auto& parameter : parameters) {
1214 BOLT_USER_CHECK(parameter.kind == TypeParameterKind::kType);
1215 BOLT_USER_CHECK_NOT_NULL(parameter.type);
1216 }
1217
1218 std::vector<TypePtr> argumentTypes;
1219 argumentTypes.reserve(parameters.size() - 1);
1220 for (auto i = 0; i < parameters.size() - 1; ++i) {
1221 argumentTypes.push_back(parameters[i].type);
1222 }
1223
1224 return FUNCTION(std::move(argumentTypes), parameters.back().type);
1225 }
1226};
1227
1228using ParametricTypeMap = std::unordered_map<

Callers

nothing calls this directly

Calls 5

FUNCTIONFunction · 0.85
backMethod · 0.80
sizeMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected