Skip to content

C++ Network Library Style Guidelines

Glyn Matthews edited this page Nov 28, 2013 · 4 revisions

I’m starting this in response to a question raised on the mailing list.

Now, style guidelines sound like a great idea, but in practice this is going to be impossible to enforce. For one thing, any guidelines are going to be pretty much arbitrary and not easy to defend if anyone breaks them, and the project admins will probably feel it’s not a valuable use of their time. But, consistency of style is going to be vital as this project grows.

So, beyond boost’s own requirements, it’s perhaps a good idea to define what’s acceptable and not acceptable within our own project.

We follow Google’s style guidelines.

I can start with some observations I’ve made about the organisation of the directory and namespace structures:

Directory and Namespace Structure Guidelines

  1. protocol specific stuff belongs in the namespace (e.g. HTTP) network::http and the directory network/http/.
  2. URI specific stuff belongs in the uri submodule network namespace and directory network/uri/.
  3. Implementation specific headers belong in network::*::detail network/*/detail.
  4. Implementations are put in .ipp files that live alongside the .hpp files. The .ipp file is included by a .cpp file in libs/network/src/ which is then compiled.
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy