From: Sage Weil Date: Wed, 23 May 2018 11:42:09 +0000 (-0500) Subject: CodingStyle: allow #pragma once X-Git-Tag: v14.0.0~16^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2c45dc6fe708e913415cec24b5ddbb7b48d2eef1;p=ceph.git CodingStyle: allow #pragma once Signed-off-by: Sage Weil --- diff --git a/CodingStyle b/CodingStyle index 7c9035e65e03b..7e9621e27e8d2 100644 --- a/CodingStyle +++ b/CodingStyle @@ -101,7 +101,11 @@ by section. if (foo) { bar; } // definitely no +* Header Files -> The `#define` Guard: + `#pragma once` is allowed for simplicity at the expense of + portability sinces `#pragma once` is wildly supported and is known + to work on GCC and Clang. The following guidelines have not been followed in the legacy code,