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.comp_with_t] Missing description for template <class T> constexpr bool operator<(const T&, const optional<T>&); #142

Closed
BillyONeal opened this issue May 27, 2013 · 2 comments

Comments

@BillyONeal
Copy link
Contributor

In the C++14 CD (N3691), 20.6.2 [optional.syn] has the following:

// 20.6.10, Comparison with T
template <class T> constexpr bool operator==(const optional<T>&, const T&);
template <class T> constexpr bool operator==(const T&, const optional<T>&);
template <class T> constexpr bool operator<(const optional<T>&, const T&);
template <class T> constexpr bool operator<(const T&, const optional<T>&);

But 20.6.10 [optional.comp_with_t] is missing the description for

template <class T> constexpr bool operator<(const T&, const optional<T>&);

I’d assume that the description should read:

template <class T> constexpr bool operator<(const T& v, const optional<T>& x);
4. Returns: bool(x) ? less<T>{}(v, *x) : false.

(Thanks to Stephan T. Lavavej who pointed out forgetting the variable names in the proposed fix)

Thanks!

@sdutoit
Copy link
Contributor

sdutoit commented Aug 27, 2013

Not editorial, but it seems an LWG issue has been added instead.

@sdutoit sdutoit closed this as completed Aug 27, 2013
@BillyONeal
Copy link
Contributor Author

Thanks :)

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

No branches or pull requests

2 participants