On Friday, August 16, 2019 at 4:19:20 PM UTC+10, Henri Sivonen wrote:
> This week, I wrote some code that made me wish we already had support
> for structured bindings and return by initializer list (both from
> C++17) for mozilla::Tuple.
> 
> That is, if we have
> mozilla::Tuple<size_t, size_t> Foo()
> it would be nice to be able to call it via
> auto [a, b] = Foo();
> and within Foo to write returns as
> return { a, b };
> 
> It appears that our minimum GCC and minimum clang documented at
> https://developer.mozilla.org/en-US/docs/Mozilla/Using_CXX_in_Mozilla_code
> are pretty old.
> 
> What's the current outlook for increasing the minimum GCC and clang
> versions such that we could start using structured bindings and return
> by initializer list for tuples (either by making sure mozilla::Tuple
> support these or by migrating from mozilla::Tuple to std::tuple) and
> thereby get ergonomic multiple return values in C++?
> 
> -- 
> Henri Sivonen
> hsi...@mozilla.com

I'm guessing that https://bugzilla.mozilla.org/show_bug.cgi?id=1560664 will 
deal with compiler details. (I don't think we can use a C++17 feature without 
enabling C++17 overall -- right?)

I too am eager to start using C++17, mostly constexpr-if.

Cheers,
Gerald
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to