On Jun 27, 2012, at 9:37 AM, Jordan Rose wrote: > On Jun 27, 2012, at 9:33 , Dmitri Gribenko <[email protected]> wrote: > >> Why not StringRefs? > > Per Doug's comment: > >> + /// Contains text value associated with a token. >> + StringRef TextValue1; >> + >> + /// Contains text value associated with a token. >> + StringRef TextValue2; >> >> It would be nice if Token were a POD type. Could we just store ptr/length >> for TextValue1 and TextValue2, so that Token remains a POD? > > Oops, I forgot that SourceLocation is POD (of course). Never mind.
Wait, what? In what sense is StringRef not POD when SourceLocation is? Neither is technically POD, because they both have a non-trivial default constructor. However, both are trivially copyable and standard layout. John.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
