Re: [Firebird-devel] Modern C++: constexpr

2020-06-16 Thread Alex Peshkoff via Firebird-devel
On 2020-06-16 11:04, Dmitry Yemanov wrote: 16.06.2020 10:49, Alex Peshkoff via Firebird-devel wrote:    Is "constexpr" allowed for usage? IMO it should. I'm also playing with some containers I think we should allow: shared_ptr (with adaptor for our pools), unique_ptr. I plan to talk more o

Re: [Firebird-devel] Modern C++: constexpr

2020-06-16 Thread Dimitry Sibiryakov
16.06.2020 02:35, Adriano dos Santos Fernandes wrote: You mean: imagine if the normal thing happen? :) Every Firebird pointer is deleted with global delete. Didn't overriding of global delete operator cause compilation and runtime problems on MacOSX at least? And doesn't it require strictly

Re: [Firebird-devel] Modern C++: constexpr

2020-06-16 Thread Dmitry Yemanov
16.06.2020 10:49, Alex Peshkoff via Firebird-devel wrote:    Is "constexpr" allowed for usage? IMO it should. I'm also playing with some containers I think we should allow: shared_ptr (with adaptor for our pools), unique_ptr. I plan to talk more on this in the future. Do we have some sho

Re: [Firebird-devel] Modern C++: constexpr

2020-06-16 Thread Alex Peshkoff via Firebird-devel
On 2020-06-15 21:03, Adriano dos Santos Fernandes wrote: On 15/06/2020 14:56, Dimitry Sibiryakov wrote:   Hello All.   Is "constexpr" allowed for usage? IMO it should. I'm also playing with some containers I think we should allow: shared_ptr (with adaptor for our pools), unique_ptr. I pla

Re: [Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Adriano dos Santos Fernandes
On 15/06/2020 18:55, Dimitry Sibiryakov wrote: > 15.06.2020 23:37, Adriano dos Santos Fernandes wrote: >> AFAIK unique_ptr does not allocate memory. > >   Yes, but it deallocates. Imagine mistakenly called delete on a pointer > got from pool. That's my concern. > > You mean: imagine if the norm

Re: [Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Dimitry Sibiryakov
15.06.2020 23:37, Adriano dos Santos Fernandes wrote: AFAIK unique_ptr does not allocate memory. Yes, but it deallocates. Imagine mistakenly called delete on a pointer got from pool. That's my concern. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforg

Re: [Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Adriano dos Santos Fernandes
On 15/06/2020 16:27, Dimitry Sibiryakov wrote: > 15.06.2020 20:03, Adriano dos Santos Fernandes wrote: >> I'm also playing with some containers I think we should allow: >> shared_ptr (with adaptor for our pools), unique_ptr. > >   unique_ptr is fine if you know a sure way to prevent its usage with

Re: [Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Dimitry Sibiryakov
15.06.2020 20:03, Adriano dos Santos Fernandes wrote: I'm also playing with some containers I think we should allow: shared_ptr (with adaptor for our pools), unique_ptr. unique_ptr is fine if you know a sure way to prevent its usage with default allocator by mistake. shared_ptr AFAIK uses

Re: [Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Adriano dos Santos Fernandes
On 15/06/2020 14:56, Dimitry Sibiryakov wrote: >   Hello All. > >   Is "constexpr" allowed for usage? > IMO it should. I'm also playing with some containers I think we should allow: shared_ptr (with adaptor for our pools), unique_ptr. I plan to talk more on this in the future. Adriano Fire

[Firebird-devel] Modern C++: constexpr

2020-06-15 Thread Dimitry Sibiryakov
Hello All. Is "constexpr" allowed for usage? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel