File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ kindForType(const Type *TP, const HeuristicResolver *Resolver) {
164
164
165
165
// Whether T is const in a loose sense - is a variable with this type readonly?
166
166
bool isConst (QualType T) {
167
- if (T.isNull () || T-> isDependentType () )
167
+ if (T.isNull ())
168
168
return false ;
169
169
T = T.getNonReferenceType ();
170
170
if (T.isConstQualified ())
Original file line number Diff line number Diff line change @@ -855,6 +855,17 @@ sizeof...($TemplateParameter[[Elements]]);
855
855
const char *$LocalVariable_decl_readonly[[s]] = $LocalVariable_readonly_static[[__func__]];
856
856
}
857
857
)cpp" ,
858
+ // Issue 1022: readonly modifier for generic parameter
859
+ R"cpp(
860
+ template <typename $TemplateParameter_decl[[T]]>
861
+ auto $Function_decl[[foo]](const $TemplateParameter[[T]] $Parameter_decl_readonly[[template_type]],
862
+ const $TemplateParameter[[auto]] $Parameter_decl_readonly[[auto_type]],
863
+ const int $Parameter_decl_readonly[[explicit_type]]) {
864
+ return $Parameter_readonly[[template_type]]
865
+ + $Parameter_readonly[[auto_type]]
866
+ + $Parameter_readonly[[explicit_type]];
867
+ }
868
+ )cpp" ,
858
869
// Explicit template specialization
859
870
R"cpp(
860
871
struct $Class_decl[[Base]]{};
You can’t perform that action at this time.
0 commit comments