From ceaddf311ef17f9d194cdeb7b8c3b06099f35264 Mon Sep 17 00:00:00 2001 From: hsutter Date: Wed, 2 Dec 2015 12:12:49 -0800 Subject: [PATCH] Added comments to P.6 to address Issue 9 --- CppCoreGuidelines.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index bfe23a5..63c5ae0 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -616,6 +616,8 @@ Also, it is implicit that `f2()` is supposed to `delete` its argument (or did th The standard library resource management pointers fail to pass the size when they point to an object: extern void f3(unique_ptr, int n); // separately compiled, possibly dynamically loaded + // NB: this assumes the calling code is ABI-compatible, using a + // compatible C++ compiler and the same stdlib implementation void g3(int n) { @@ -627,7 +629,9 @@ The standard library resource management pointers fail to pass the size when the We need to pass the pointer and the number of elements as an integral object: extern void f4(vector&); // separately compiled, possibly dynamically loaded - extern void f4(span); // separately compiled, possibly dynamically loaded + extern void f4(span); // separately compiled, possibly dynamically loaded + // NB: this assumes the calling code is ABI-compatible, using a + // compatible C++ compiler and the same stdlib implementation void g3(int n) {