[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syntax_error constructor is declared inline

From: Hans Åberg
Subject: Re: syntax_error constructor is declared inline
Date: Wed, 14 Mar 2018 17:41:22 +0100

> On 14 Mar 2018, at 15:46, Frank Heckenbach <address@hidden> wrote:
> Hans Åberg wrote:
>> It is sort of strange in C++ to not have a header, and having
>> inlines not in those.
> Sure, I think it was just a mistake. Bison puts inlines for some
> classes it uses internally (by_state, stack_symbol_type) in the C++
> file, that's OK (though they don't really need the "inline" keyword
> then, since it doesn't mean "can be inlined", but "can be defined in
> several compilation units" in modern C++, but it doesn't hurt), and
> probably by accident they caught the syntax_error inline
> constructor, too.

It could be deliberate to avoid them being exported. But C++ now has 
namespaces, which cann be used to avoid name conflicts.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]