KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::Deprecated Class Reference

Convenience class for marking deprecated functions. A static object of this class can be created inside deprecated functions. It will output a warning message to stderr if the deprecated function is called, but only once. More...

#include <deprecation.hh>

Public Member Functions

 Deprecated (std::string const &comment, int year)
 Constructor.

Detailed Description

Convenience class for marking deprecated functions. A static object of this class can be created inside deprecated functions. It will output a warning message to stderr if the deprecated function is called, but only once.

void f()
{
static Deprecated dummy("f() is deprecated, use g() instead",2018);
}
Deprecated(std::string const &comment, int year)
Constructor.

After the given grace period is passed, the program is aborted.

Definition at line 34 of file deprecation.hh.

Constructor & Destructor Documentation

◆ Deprecated()

Kaskade::Deprecated::Deprecated ( std::string const & comment,
int year )

Constructor.

Parameters
commentThe comment to be written to stderr along with a generic warning
yearthe grace period

The documentation for this class was generated from the following file: