#include <iostream>
typedef int Entity;
struct Attachment {
Entity entity;
Attachment(Entity& mEntity) : entity(mEntity) { }
};
// ---
// User code
struct MyAttachment1 : Attachment {
// This is annoying to write for every attachment type
// Especially when there are other constructor arguments
// And if there are a lot of attachment types
using Attachment::Attachment;
};
int main() {
// your code goes here
int i =1;
MyAttachment1 a(i);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp0eXBlZGVmIGludCBFbnRpdHk7CnN0cnVjdCBBdHRhY2htZW50IHsgCiAgICBFbnRpdHkgZW50aXR5OwogICAgQXR0YWNobWVudChFbnRpdHkmIG1FbnRpdHkpIDogZW50aXR5KG1FbnRpdHkpIHsgfQp9OwoKLy8gLS0tCi8vIFVzZXIgY29kZQpzdHJ1Y3QgTXlBdHRhY2htZW50MSA6IEF0dGFjaG1lbnQgeyAKICAgIC8vIFRoaXMgaXMgYW5ub3lpbmcgdG8gd3JpdGUgZm9yIGV2ZXJ5IGF0dGFjaG1lbnQgdHlwZQogICAgLy8gRXNwZWNpYWxseSB3aGVuIHRoZXJlIGFyZSBvdGhlciBjb25zdHJ1Y3RvciBhcmd1bWVudHMKICAgIC8vIEFuZCBpZiB0aGVyZSBhcmUgYSBsb3Qgb2YgYXR0YWNobWVudCB0eXBlcwogICAgdXNpbmcgQXR0YWNobWVudDo6QXR0YWNobWVudDsKfTsKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgaSAgPTE7CglNeUF0dGFjaG1lbnQxIGEoaSk7CglyZXR1cm4gMDsKfQ==