[cfe-commits] r59232 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Sat Nov 15 19:28:58 PST 2008
On Nov 15, 2008, at 5:55 AM, Zhongxing Xu wrote:
>
> One side problem is that I cannot make the MemRegion* in the
> ImmutableList const. If I did that, I would get compile error,
> related to FoldingSet Profile() overloading.
>
> It seems that ImmutableList cannot take a const type as template
> parameter, otherwise the two Profile functions in the partial
> specialization of FoldingSetTrait would have the same signature.
> (FoldingSet.h:444, 447).
Could we provide a partial specialization of FoldingSetTrait just for
ImmutableList? Or, does (something like) this work (i.e., add another
partial specialization for const types):
template<typename const T> struct FoldingSetTrait<const T*> {
static inline void Profile(const T* X, FoldingSetNodeID& ID) {
ID.AddPointer(X);
}
};
More information about the cfe-commits
mailing list