This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I'm not too good at figuring out whether code is portable or not, so I'mA general problem I can easily see with this kind of idea is that its profitability
not rally sure that this would be acceptable, so I'd like to hear from
the experts.
ffirst_of(string const& src, string const& f) { #if __CHAR_BIT__ <= 8 char table[1 << __CHAR_BIT__] = { 0 }; string::size_type sz = f.size(); string::size_type i;
for (i = 0; i < sz; ++i)
table[(unsigned int)f[i]] = 1;
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |