mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
CONFIG: enable use of stricter deprecation warnings
- selected with '+strict' in WM_COMPILE_CONTROL or 'wmake -strict', it enables the FOAM_DEPRECATED_STRICT() macro, which can be used to mark methods that are implicitly deprecated, but are not yet marked as full deprecated (eg, API modification is too recent, generates too many warnings). Can be considered a developer option.
This commit is contained in:
@ -110,6 +110,13 @@ public:
|
||||
|
||||
//- Destructor
|
||||
~IFstreamDelayed() = default;
|
||||
|
||||
// Testing deprecation warnings
|
||||
FOAM_DEPRECATED_STRICT(2023-08, "direct calling")
|
||||
Istream& operator()() const
|
||||
{
|
||||
return const_cast<IFstreamDelayed&>(*this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -281,6 +288,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
IFstreamDelayed is(args[argi]);
|
||||
|
||||
// Trigger strict warning?
|
||||
Info<< "stream: " << is().name() << nl;
|
||||
|
||||
dictionary dict(is);
|
||||
Info<< "read: " << dict << nl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user