-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting the default constructor of some classes #27
Comments
For E.g.,
When For |
I see, thanks for the explanation. If we want to discourage it, we could make the default constructor private. But that wouldn't actually prevent people from constructing an empty
Nsight Systems just shows an unnamed range which has no attribute: I think the most important question is what semantics do we want to give to a default-constructed range. Should it be an unnamed range? Or should it be an empty object that doesn't generate a range? This intersects the discussion we have in #28. If we want to support "conditional" range (i.e. emit a range "if"), then we might need to change the semantic of the range default-constructor. Note that people that actually want to emit a range with empty attributes could still do it by explicitly creating an empty |
It's a good question. When I'm faced with questions like this, I usually look for inspiration in the STL.
So perhaps that means In re: #28, we can accomplish constructing a |
For the following classes, it might make sense to delete the default-constructor:
event_attributes
domain_thread_range
domain_process_range
What is the rational for allowing the creation of an empty event attribute or a thread range with an empty event attribute? I understand that the NVTX API does not prohibit this behavior but a range or event without any attribute will be meaningless for most, if not all, tools.
The text was updated successfully, but these errors were encountered: