Skip to content
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

[optional] Declare std::nullopt as a constant, not a function as is done now. #140

Closed
wants to merge 1 commit into from

Conversation

p12tic
Copy link

@p12tic p12tic commented May 18, 2013

No description provided.

Declare std::nullopt as a constant, not a function as is done now.
@jwakely
Copy link
Member

jwakely commented May 19, 2013

I don't think this is a defect, the wording says "Constant nullopt shall be initialized with an argument of literal type." So if it's initialized as e.g. constexpr nullopt_t nullopt(1); that's not possible to parse as a function.

@p12tic
Copy link
Author

p12tic commented May 21, 2013

Indeed, it's not a defect.

However, since both of {1} and (1) lead to direct-initialization, maybe it's worth to change the parentheses to curly braces for the sake of clarity?

@sdutoit
Copy link
Contributor

sdutoit commented Oct 15, 2013

Closing as optional has been reverted from the WD.

@sdutoit sdutoit closed this Oct 15, 2013
@p12tic p12tic deleted the fix-nullopt-declaration branch October 15, 2013 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants