Thread overview | |||||
---|---|---|---|---|---|
|
January 29, 2017 [dmd-internals] Bring constructor declarations back in C++ header files | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hi all, Why were the constructor declarations removed in the C++ header files in 2.072? It leads to massive warning spam, and enables default constructors............ Please enable C++ warnings in your DMD development setups. There are other serious errors in the header files that would have been easily caught with warnings on, e.g.: ``` ../ddmd/attrib.h:48:17: warning: 'AttribDeclaration::kind' hides overloaded virtual function [-Woverloaded-virtual] const char *kind() const; ^ ../ddmd/dsymbol.h:214:25: note: hidden overloaded virtual function 'Dsymbol::kind' declared here: different qualifiers (none vs const) virtual const char *kind(); ``` Thanks, Johan |
January 30, 2017 Re: [dmd-internals] Bring constructor declarations back in C++ header files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen Attachments:
| On 01/29/2017 10:43 PM, Johan Engelen via dmd-internals wrote:
> Hi all,
> Why were the constructor declarations removed in the C++ header files
> in 2.072?
Because classes are always constructed by D code.
Guess it was simply an oversight.
How about deleting default constructors (like needs some alternative
macro for dmc support)?
|
January 30, 2017 Re: [dmd-internals] Bring constructor declarations back in C++ header files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak Attachments:
| On Mon, Jan 30, 2017 at 5:18 PM, Martin Nowak via dmd-internals < dmd-internals@puremagic.com> wrote: > On 01/29/2017 10:43 PM, Johan Engelen via dmd-internals wrote: > > Hi all, > > Why were the constructor declarations removed in the C++ header files > > in 2.072? > > Because classes are always constructed by D code. > I was hoping there was a better reason than that. > Guess it was simply an oversight. > How about deleting default constructors (like needs some alternative > macro for dmc support)? > Also works. |
Copyright © 1999-2021 by the D Language Foundation