[libcxx-commits] [PATCH] D140911: [libc++] Implement P2505R5(Monadic operations for std::expected)

Yurong via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 16 05:54:21 PST 2023


yronglin marked 5 inline comments as done.
yronglin added inline comments.


================
Comment at: libcxx/include/__expected/expected.h:68
+
 namespace __expected {
 
----------------
yronglin wrote:
> philnik wrote:
> > huixie90 wrote:
> > > philnik wrote:
> > > > @huixie90 Why do we have this namespace? It doesn't really seem worth it just for `__throw_bad_expected_access`.
> > > The honest answer is i can't remember. perhaps in some point of time I had several functions but got deleted in the end. But it seems that after this patch, there is more stuff in it.
> > I would remove the namespace then. It doesn't really improve the readability in any way, since every single member has `expected` already in it's name. We also don't have these kinds of detail namespaces normally.
> If we decided to remove __expected namespace, I think __unexpected namespace in unexpected.h also should be removed, What do you think?
If we decided to remove `__expected` namespace, I think `__unexpected` namespace in unexpected.h also should be removed, What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140911/new/

https://reviews.llvm.org/D140911



More information about the libcxx-commits mailing list