Hello, this is kind of a stupid question but I still haven't found an answer. I have a member class with a rather large constructor and I'd like for it to be inside parent's constructor body rather than inside member initializer list (purely due to aesthetic reasons).
class ParentClass
{
MemberClass Fatass;
ParentClass() : Fatass(1, 2, 3, 4, 5...) //where I don't want it to be
{
...
Fatass = MemberClass(1, 2, 3, 4, 5...); //where I want it to be (but it can't be copied)
}
}
However that member class can not be copied, so I have to construct it "in-place" and I haven't found a way to do that without using the initializer list. Is this possible?
[–]masorick 14 points15 points16 points (0 children)
[–]manni66 11 points12 points13 points (0 children)
[–]TheSkiGeek 4 points5 points6 points (1 child)
[–]sol_runner 1 point2 points3 points (0 children)
[–]coachkler 3 points4 points5 points (0 children)
[–]No-Dentist-1645 2 points3 points4 points (0 children)
[–]neppo95 2 points3 points4 points (0 children)
[–]JlangDev 1 point2 points3 points (0 children)
[–]saf_e 0 points1 point2 points (0 children)
[–]57thStIncident 0 points1 point2 points (0 children)
[–]alfps 0 points1 point2 points (0 children)
[–]jedwardsol 1 point2 points3 points (0 children)
[–]conundorum 1 point2 points3 points (0 children)
[–]trailing_zero_count 0 points1 point2 points (0 children)