From d53b1e6619e11ebb51e1a29d0847166685307be0 Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Mon, 18 Mar 2024 13:40:13 -0700 Subject: Add template keyword to example comment for Layout::WithStaticSizes. Without this keyword, we can sometimes get cryptic compilation failures such as "error: expected ';' after alias declaration". PiperOrigin-RevId: 616933517 Change-Id: I2209f3899a4ac03c031217cec67de25bd376d355 --- absl/container/internal/layout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/absl/container/internal/layout.h b/absl/container/internal/layout.h index 72c14112..d42651a2 100644 --- a/absl/container/internal/layout.h +++ b/absl/container/internal/layout.h @@ -85,9 +85,9 @@ // generate optimal code. To help the compiler do that in more cases, you can // specify the fixed sizes using `WithStaticSizes`. This ensures that all // computations that can be performed at compile time are indeed performed at -// compile time. E.g.: +// compile time. Note that sometimes the `template` keyword is needed. E.g.: // -// using SL = L::WithStaticSizes<1, 1>; +// using SL = L::template WithStaticSizes<1, 1>; // // void Use(unsigned char* p) { // // First, extract N and M. -- cgit v1.2.3