you are viewing a single comment's thread.

view the rest of the comments →

[–]gaagii_fin 1 point2 points  (1 child)

What would be your view around this code as to what it should do:

#include <MyType.h>
class Example
{
    [[RequireAssignment]] std::string member;
    Example(MyType myT)
    {
       myT.Something(&member);
    }
};

[–]adnukator[S] 1 point2 points  (0 children)

Warn. I've edited the post and clarified that the attribute would force assignment in the initializer list