Expand on notes about cv-qualified function and reference types. I wanted to figure out what a cv-qualified function or reference even *means*, and the answer is actually pretty straightforward: "the same thing as the non-cv-qualified version". So rather than being "nonsensical", it's more that this is two different ways to spell the same type. And we may, rather than forbidding it, want to handle it in the same way as we handle alias normalization more generally. PiperOrigin-RevId: 399619199
diff --git a/rs_bindings_from_cc/ir.h b/rs_bindings_from_cc/ir.h index 4351839..a87be71 100644 --- a/rs_bindings_from_cc/ir.h +++ b/rs_bindings_from_cc/ir.h
@@ -73,11 +73,10 @@ // The C++ const-qualification for the type. // - // Note: there are two types for which cv-qualification does not apply: - // references and functions. So strictly speaking, much as the current type - // structure allows for you to make a nonsensical `*<T, U>` or `*<>`, it also - // allows for a nonsensical cv-qualified reference type of function type - // (when we add those). + // Note: there are two types for which cv-qualification does not do anything: + // references and functions. if `T` is either a function type like `void()`, + // or a reference type like `int&`, then `T`, `const T`, and `volatile T` are + // all the same type in C++. bool cc_const = false; // Type parameters for a generic type. Examples: