Timeline for Implementing a very simple memory block for quick allocation and memory alignment. C++
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 20, 2020 at 7:49 | history | edited | G. Sliepen | CC BY-SA 4.0 |
deleted 100 characters in body
|
Jul 20, 2020 at 7:48 | comment | added | G. Sliepen |
Ok, that's a good reason for having both assert() and throw() . Keep on doing that then :) I did make a mistake in the example of aligned new . Also, for the aligned new operator, you might have to #include <new> . But it might be that MSVC does not support aligned new anyway.
|
|
Jul 20, 2020 at 1:22 | vote | accept | Matias Chara | ||
Jul 19, 2020 at 22:47 | comment | added | Matias Chara | also, are you sure the syntax you show for the aligned overload of the c++17 new operator is correct? gives me a compile error.(again I dont know if this is just visual studio deviating from the standard again or an error on your part, please confirm.) | |
Jul 19, 2020 at 22:31 | comment | added | Matias Chara | Very useful analysis!!! I must point out however a few things: visual studio does not provide an implementation for c++17`s aligned_alloc(), crazy right? and also, I use assert() because if everything goes right in the public function then that private function should never have that assertion fail, if it does it is I who has done a mistake not the public interface caller. | |
Jul 19, 2020 at 22:27 | history | answered | G. Sliepen | CC BY-SA 4.0 |