Patrick Pelissier
96202aa78f
Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers)
2018-07-14 14:35:14 +02:00
Patrick Pelissier
f2b2335080
Fix issue with C++ not supporting passing an int constant value to an unsigned atomic type...
...
I definitely find this disturbing.
2018-03-16 22:59:51 +01:00
Patrick Pelissier
e540a95ad0
Fix spelling
2018-02-24 15:28:07 +01:00
Patrick Pelissier
d258fb3eff
Fix memory leak
2018-02-23 23:13:10 +01:00
Patrick Pelissier
acb1aa8104
Add new restriction
2018-02-20 22:12:03 +01:00
Patrick Pelissier
2dc71cc5fd
Fix bug
2018-02-20 22:01:19 +01:00
Patrick Pelissier
4a92419bbe
Add tests
2018-02-20 21:55:16 +01:00
Patrick Pelissier
92699501f6
Add more assertions
2018-02-19 23:41:29 +01:00
Patrick Pelissier
b49ed97be0
Update comment
2018-02-19 23:38:22 +01:00
Patrick Pelissier
aec661edea
Add shared ressource container
2018-02-19 23:37:10 +01:00
Patrick Pelissier
a9aa1e13ee
Add relaxed shared pointer (thread unsafe with non-atomic counter).
2018-02-10 17:31:12 +01:00
Patrick Pelissier
f5857c8aab
Create an oplist for the counter and use it.
...
It will allow to use other oplist.
2018-02-10 17:22:51 +01:00
Patrick Pelissier
210e05f7fc
Update copyright to 2018
2018-01-29 20:28:30 +01:00
Patrick Pelissier
2e564088b0
Simplify the inclusion of headers.
2017-09-16 10:14:45 +02:00
Patrick Pelissier
1930bdeac1
_DEF macros checks if a global oplist is register if there is no one
...
given in the macro call. If it founds one, it will be it instead
of M_DEFAULT_OPLIST.
2017-09-16 08:31:22 +02:00
Patrick Pelissier
d08e2bba95
Add I/O for deque
2017-09-06 21:05:57 +02:00
Patrick Pelissier
5c5fbd9bf0
Remove warnings for some compilers.
2017-08-05 19:26:50 +02:00
Patrick Pelissier
e8c952def8
Remove prefix shared_ from all definition of the functions / types of shared pointer.
...
This make the name shorter, give the user full control over the prefix,
give the user full power over the name,
allow more flexibility over the kind of container (allowing switch quickly),
and uniformize with variant_, tuple_ & algo_.
This is better than the current situation and all containers will switch.
==> Break API compatibility:
To fix this quickly, just add shared_ before the name into the
macro SHARED_PTR_DEF & SHARED_OPLIST.
This will generate the same name than before.
2017-07-25 22:19:08 +02:00
Patrick Pelissier
d44c60670e
Add function equal_p.
2017-07-16 23:59:55 +02:00
Patrick Pelissier
b1c6681c92
Use of M_CONST_CAST
2017-05-26 15:49:09 +02:00
Patrick Pelissier
a5dac33524
Add more assertions.
2017-04-13 22:47:39 +02:00
Patrick Pelissier
d5bd3674d8
Make it cleaner for static analysis:
...
add more assertions.
2017-04-13 22:45:27 +02:00
Patrick Pelissier
72c5c3f371
Replace stdatomic.h (C11 standard compliant header) by a custom one
...
to increase C++ compatibility as stdatomic.h doesn't work in C++!
(I would like to thanks the one(s) who thought it was a good idea
***not*** to include stdatomic.h -and thread.h- in the C++ standard!)
2017-04-13 21:50:16 +02:00
Patrick Pelissier
6e19864d44
Fix wrong strict usage of atomic (missing atomic_init & atomic_load).
2017-04-08 11:09:06 +02:00
Patrick Pelissier
ebf24d41cf
Export back NEW / DEL / REALLOC of oplist to container oplist
2017-03-30 20:57:44 +02:00
Patrick Pelissier
2ade0805e7
Fix issue with clang 4.
2017-03-18 14:22:19 +01:00
Patrick Pelissier
5ff056656a
Clean up shared_ptr interface:
...
* remove release
* add clean
2017-03-16 22:26:15 +01:00
Patrick Pelissier
50163118f4
Rewrite unique slot detection to be standard compliant.
2017-03-16 00:14:14 +01:00
Patrick Pelissier
ba37d183a7
Only one alloc per init_new.
2017-03-15 22:06:50 +01:00
Patrick Pelissier
de7d0bd682
Add _init_new operation for shared_ptr
2017-03-15 00:17:41 +01:00
Patrick Pelissier
7118da65ae
Add SWAP for m-shared
2017-03-14 21:43:52 +01:00
Patrick Pelissier
9c7fcc6659
Reformat comment
2017-03-13 23:19:20 +01:00
Patrick Pelissier
29e01a9e2d
Add oplist for oplist of shared pointer
...
Fix issue in case of memory full of shared_pointer with no throw mechanism.
2017-03-06 22:45:15 +01:00
Patrick Pelissier
4d019ca1f2
Update library name in headers.
2017-02-20 21:29:21 +01:00
Patrick Pelissier
cb433aa2a8
Rename macros:
...
* CAT* --> M_C*
2017-02-19 00:36:42 +01:00
Patrick Pelissier
8e9d20ba1a
Add initial stuff
2017-02-18 18:51:04 +01:00