C++ Logo


Advanced search

Re: [std-proposals] Export namespaces without namespace block, only keyword (modules)

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Mon, 15 Aug 2022 10:04:12 -0400
On Mon, Aug 15, 2022 at 5:39 AM Zopolis0 via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> Apologies for top-posting as a reply, I did not receive the previous email due to a settings misconfiguration and as such cannot reply to it through normal means. The problem has since been resolved.
> The functions provided were only an example. For more complex, multi-line functions, as is the typical function, having to wrap them in a namespace block can get quite annoying.

What is "annoying" about this?

My general sense from this is that you're basically trying to avoid
using namespaces in the *implementation* of a module, while still
putting the exported results into a namespace. This is not a thing we
should encourage. Just put your stuff in the namespace and move on.

It's 3 lines of code, and overall, it's *less* actual text if you use
blocks than if you force every export declaration to have a namespace

Received on 2022-08-15 14:04:35