Michael Davidsaver
a5d44745d1
cleanup testSharedVector
...
"using namespace" considered harmful...
2019-04-08 09:46:07 -07:00
Michael Davidsaver
09574c0e82
sharedVector more c++11
...
support std::move() and construct
from initializer list.
2018-01-05 11:14:59 -08:00
Michael Davidsaver
c590204cf9
add epics::auto_ptr<T> and epics::swap()
...
Avoid the flood of auto_ptr deprecation warnings
in the common cases of using auto_ptr
to automatically delete.
2017-11-06 12:30:40 -06:00
Dave Hickin
d9072402db
Update source boilerplate for new LICENSE file
2016-07-22 15:56:43 +01:00
Michael Davidsaver
b0df40d9a6
testSharedVector more PG locals
2016-03-01 13:25:20 -05:00
Michael Davidsaver
a8ba831f5e
fix freeze() of shared_vector<void>
2016-02-26 12:13:23 -05:00
Michael Davidsaver
4546fda8e9
note shared_vector casts which should fail
2016-02-26 12:13:23 -05:00
Michael Davidsaver
dc94b26e50
fix static_shared_vector_cast<>() no-op casting
...
Turns out that Enablers as typically used for
member functions don't work to select
constructors.
Move this selection logic to
struct detail::static_shared_vector_caster<>
to correctly allow no-op casts (eg. void to void).
Previously this would not compile.
Allows PVScalarArray getAs() and putFrom() using
shared_vector<const void>.
2016-02-26 12:13:23 -05:00
Dave Hickin
40952df965
Corrected spelling in test and exception messages
...
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk >
2015-07-08 18:19:53 +01:00
Dave Hickin
4f2c51c480
Correct spelling and typos in doxygen and comments
...
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk >
2015-07-08 18:18:37 +01:00
Matej Sekoranja
f506fe1c0e
int/int32 compilation fix; now all test spass on RTEMS-i386
2014-11-05 14:05:28 +01:00
Matej Sekoranja
554dc06eda
ScalarTypeID mapping fixed in case 'int' == 'long', e.g. RTEMS-i386
2014-11-05 13:52:10 +01:00
Matej Sekoranja
c6eed12139
String -> std::string, toString methods removed
2014-06-19 14:27:48 +02:00
Matej Sekoranja
301038664e
win32 port: visibility, warnings, templates
2013-11-27 01:11:12 +01:00
Michael Davidsaver
de70d90603
shared_vector: simplify slice()
...
Correctly tracks capacity when user
over-slices.
2013-08-06 11:32:34 -04:00
Michael Davidsaver
569bd3b681
update testSharedVector
2013-07-25 17:02:08 -04:00
Michael Davidsaver
70ae281f45
test freeze/thaw
2013-07-16 18:59:04 -04:00
Michael Davidsaver
46feb86a99
test shared_vector_convert
2013-07-09 18:24:41 -04:00
Michael Davidsaver
4e749cc8be
Improve shared_vector::push_back
...
push_back now allocates additional space
in powers of 2 up to 1k elements, then
in blocks of 1k elements.
2013-06-11 17:42:30 -04:00
Michael Davidsaver
be4738f59c
remove weak_vector
...
It seems that shared_ptr::use_count() does
not include weak_ptr instances. Therefore
shared_ptr::use_count()==1 (aka unique())
does *not* ensure exclusive ownership!
This breaks the assumption used by
shared_vector::make_unique() to avoid
allocating a new array in some cases.
2013-06-10 15:09:42 -04:00
Michael Davidsaver
0b89f08d09
explicit copy and assignment for shared_vector
...
Add explicit copy constructor and
assignment operator for shared_vector.
2013-06-10 12:09:29 -04:00
Michael Davidsaver
ac53153bea
shared_vector: test reference and const_reference
...
Ensure that these typedefs are present and work
for 'T' and 'const T'.
2013-06-05 16:15:49 -04:00
Michael Davidsaver
bc3187a3f6
optimize shared_vector for storing non-POD types
...
pass values by reference where appropriate.
When reallocating arrays of shared_ptr
"move" with swap() instead of operator=
to avoid ref counter inc and dec for each
element.
2013-06-03 19:31:05 -04:00
Michael Davidsaver
3b6268a4fc
add const_iterator to shared_vector
2013-05-31 09:58:52 -04:00
Michael Davidsaver
b137b32fc6
test shared_vector<T>
...
use epicsUnitTest
test handling of void and const void instances
2013-05-08 18:35:50 -04:00