On 10/1/18 7:47 PM, Jason Merrill wrote:
On Mon, Oct 1, 2018 at 6:41 PM Marek Polacek <pola...@redhat.com> wrote:

This patch implements C++20 explicit(bool), as described in:
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0892r2.html>.

I tried to follow the noexcept specifier implementation where I could, which
made the non-template parts of this fairly easy.  To make explicit(expr) work
with dependent expressions, I had to add DECL_EXPLICIT_SPEC to lang_decl_fn,
which serves as a vessel to get the explicit-specifier to tsubst_function_decl
where I substitute the dependent arguments.

What's the impact of that on memory consumption?  I'm nervous about
adding another word to most functions when it's not useful to most of
them.  For several similar things we've been using hash tables on the
side.

Iain had the same question about coroutine state. For the moment we're doing the simple thing of growing lang_decl_fn. It seems the better approach is a flag in the function_decl (or it's decl_lang_specific extension) to say 'go look over there', and a hash table you know will contain something.

nathan

--
Nathan Sidwell

Reply via email to