Originally posted by pal666
View Post
Announcement
Collapse
No announcement yet.
Coroutines & Modules Added For C++20
Collapse
X
-
Originally posted by atomsymbol View PostI believe you misread the word "field" in my post and took it to mean "method".
- 2 likes
Comment
-
Originally posted by pal666 View Postno, i know what field means, i believe you misunderstood part of my reply where i said that methods are declared at the same scope that fields, but you don't need fields, you are getting them just because they are there
Comment
-
Originally posted by discordian View PostThere was an unanimous decision to make memory allocation "noexcept" in combination simpler exception handling (always throwing a known type like std::error, http://www.open-std.org/jtc1/sc22/wg...18/p0709r0.pdf).
I would guess this is referenced, but I haven been through the report yet
- 2 likes
Comment
-
Originally posted by atomsymbol View PostWhy should it matter what you think about the idea of superfluous C++ #includes/import to me? Or do you happen to be implementing a compiler?
- 2 likes
Comment
-
Originally posted by atomsymbol View PostTrue, although the PImpl pattern require the programmer to define an extra class which would be unnecessary in some cases if the language&compiler allowed usage of classes (method calls) without knowledge of field types.
Originally posted by atomsymbol View PostAbstract interfaces still require #include directives due to instantiation via operator new of interface implementations, which is unnecessary because the invoking the constructor+operator_new does not need the caller to know the representation of class's fields.Last edited by pal666; 25 February 2019, 06:51 PM.
- 1 like
Comment
-
Originally posted by atomsymbol View PostAn imaginary compiler could postpone global&static&stack allocations to link time
Originally posted by atomsymbol View PostPassing T by value: This case can be reduced to allocation of sizeof(T) bytes followed by invocation of the copy-constructor.
Originally posted by atomsymbol View PostInvoking T's default constructor, destructor, assignment operator, or copy-constructor: These are plain function calls, unless inlining.
Originally posted by atomsymbol View PostDefault constructor/etc are automatically marked as inline by current compilers - a current-compiler-specific feature.
Originally posted by atomsymbol View Postnew T(): This is a call to function "T* new_T()" created by the compiler in the single .cc file that can see the field types and thus knows sizeof(T).
- 2 likes
Comment
Comment