On Sep 29, 2005, at 10:13 , Andrew Johnson wrote:
I am not providing cast operators, and to some extent I agree about
the difficulty reading code that uses them. However the assignment
operator= is an integral part of C++ that the compiler will create
for you (usually wrongly) if you don't explicitly tell it not to.
.. right, which makes it more of a C--
class StringReader {
...
// Individual byte access
virtual char at(size_t pos) const = 0;
Yes, that looks good to me.
At one point in time, actually the Oak Ridge EPICS meeting,
we were gathered at Big Ed's Pizza, a place that I have not
visited ever since, but not because of any bad feelings,
there simply never was an opportunity for it.
Anyway, we discussed some EPICS 'OSI' ideas. One issue
was signed vs. unsigned for index variables and sizes.
I was asked what I used at the time in the archiver code,
and mentioned size_t, and the result was grave concern
because who knows how big size_t is, if it's signed or not, ...
So is it now OK to use size_t?
I assume you must still account for the unlikely possibility
that it's signed, so you always check
if (xx < 0 || xx >= length)
and then you get the warning about x always being positive
on most compilers?
Well, it's only 11:00 and now I get this urge for oil dripping
pepperoni pizza.
-Kay
- Replies:
- RE: strings Jeff Hill
- Re: strings Benjamin Franksen
- References:
- RE: data access structures, strings Jeff Hill
- Re: data access structures, strings Kay-Uwe Kasemir
- Re: data access structures, strings Andrew Johnson
- Re: data access structures, strings Kay-Uwe Kasemir
- Re: data access structures, strings Andrew Johnson
- Re: strings Kay-Uwe Kasemir
- Re: strings Andrew Johnson
- Navigate by Date:
- Prev:
Re: data access structures, strings Kay-Uwe Kasemir
- Next:
[Fwd: Re: ICALEPCS 2005: EPICS workshop: EPICS V4 Runtime Database] Marty Kraimer
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: strings Andrew Johnson
- Next:
RE: strings Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|