From 9c11853f7331fd740c763f5cc8f34903526a85d4 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 19 Dec 2024 20:24:49 +0100 Subject: update contributing.md --- contributing.md | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/contributing.md b/contributing.md index d617a66..d217410 100644 --- a/contributing.md +++ b/contributing.md @@ -177,40 +177,28 @@ that you can click on to open them. ``` -
- using namespace may not be used in header files (.h, .hpp), only - in source files (.cpp). + Using-declarations + may not be used in header files (.h, .hpp), only in + source files (.cpp).
GoodBad
example.h: ```cpp namespace crepe { - void foo(); + std::string foo(); } ``` - example.cpp: - ```cpp - #include "example.h" - using namespace crepe; - void foo() {} - ``` example.h: ```cpp + using namespace std; + namespace crepe { - template - T foo(); + string foo(); } ``` - - example.hpp: - ```cpp - #include "example.h" - using namespace crepe; - template - T foo(); - ```
-
-- cgit v1.2.3