protected:
Starter();
public:
- virtual ~Starter() { }
+ virtual ~Starter() = default;
virtual Application *create_app(int, char **) = 0;
};
protected:
Application(const std::string & = std::string());
public:
- virtual ~Application() { }
+ virtual ~Application() = default;
/** Constructs an instance of the registered application class and runs it.
If the application throws a usage_error, a help message is printed. The
public:
usage_error(const std::string &w, const std::string &h = std::string()): std::runtime_error(w), help_(h) { }
- ~usage_error() throw() { }
+ virtual ~usage_error() throw() = default;
const char *help() const throw() { return help_.c_str(); }
};
class Option
{
protected:
- Option() { }
+ Option() = default;
public:
- virtual ~Option() { }
+ virtual ~Option() = default;
/// Sets help text for the option.
virtual Option &set_help(const std::string &) = 0;
class Argument
{
protected:
- Argument() { }
+ Argument() = default;
public:
- virtual ~Argument() { }
+ virtual ~Argument() = default;
virtual Argument &set_help(const std::string &) = 0;
};
class Store
{
protected:
- Store() { }
+ Store() = default;
public:
- virtual ~Store() { }
+ virtual ~Store() = default;
virtual Store *clone() const = 0;
runtime_error(make_what(typeid(T), MapUtilsInternal::stringify_key(k)))
{ }
- virtual ~key_error() throw() { }
+ virtual ~key_error() throw() = default;
private:
static std::string make_what(const std::type_info &, const std::string &);
RefCounts *counts = 0;
public:
- RefPtr() { }
+ RefPtr() = default;
RefPtr(T *d): data(d), counts(data ? new RefCounts : 0) { incref(); }
private:
RefPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); }
RefCounts *counts = 0;
public:
- WeakPtr() { }
+ WeakPtr() = default;
private:
WeakPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); }
public:
system_error(const std::string &, int = -1);
system_error(const std::string &, const std::string &);
- virtual ~system_error() throw() { }
+ virtual ~system_error() throw() = default;
int code() const throw() { return code_; }
{
public:
type_mismatch(const std::type_info &, const std::type_info &);
- ~type_mismatch() throw() { }
+ virtual ~type_mismatch() throw() = default;
};
StoreBase *store = 0;
public:
- Variant() { }
+ Variant() = default;
template<typename T>
Variant(const T &v): store(new Store<typename std::remove_cv<T>::type>(v)) { }
Variant(const Variant &v): store(v.store ? v.store->clone() : 0) { }
{
public:
not_a_directory(const Path &);
- virtual ~not_a_directory() throw() { }
+ virtual ~not_a_directory() throw() = default;
};
/// Creates a directory
namespace Msp {
namespace FS {
-Path::Path()
-{ }
-
Path::Path(const string &p)
{
if(p.empty())
PositionArray separators;
public:
- Path();
+ Path() = default;
Path(const std::string &);
Path(const char *p): Path(std::string(p)) { }
Private *priv = 0;
public:
- Stat() { }
+ Stat() = default;
Stat(const Stat &);
Stat &operator=(const Stat &);
~Stat();
UserID owner_id = INVALID_UID;
GroupID group_id = INVALID_GID;
- Private();
+ Private() = default;
Private(const Private &);
~Private();
{
public:
file_not_found(const std::string &fn): std::runtime_error(fn) { }
- ~file_not_found() throw() { }
+ virtual ~file_not_found() throw() = default;
};
class file_already_exists: public std::runtime_error
{
public:
file_already_exists(const std::string &fn): std::runtime_error(fn) { }
- ~file_already_exists() throw() { }
+ virtual ~file_already_exists() throw() = default;
};
{
public:
invalid_access(Mode);
- ~invalid_access() throw() { }
+ virtual ~invalid_access() throw() = default;
};
} // namespace IO
{
public:
bad_seek(SeekOffset, SeekType);
- virtual ~bad_seek() throw() { }
+ virtual ~bad_seek() throw() = default;
};
class Seekable: public Base
{
protected:
- Seekable() { }
+ Seekable() = default;
public:
/** Changes the read/write offset. Returns the new offset. */
public:
zlib_error(const std::string &, int);
- ~zlib_error() throw() { }
+ virtual ~zlib_error() throw() = default;
int code() const throw() { return code_; }
};
Encoder(ErrorMode em): err_mode(em==DEFAULT ? THROW_ON_ERROR : em) { }
public:
- virtual ~Encoder() { }
+ virtual ~Encoder() = default;
/** Encodes a single unicode character. If the character can't be
represented in this encoding, error() should be called. */
Decoder(ErrorMode em): err_mode(em==DEFAULT ? THROW_ON_ERROR : em) { }
public:
- virtual ~Decoder() { }
+ virtual ~Decoder() = default;
/** Decodes a single character from a string. The iterator is advanced
to the next character. For stateful codecs, -1 may be returned if a
};
protected:
- Codec() { }
+ Codec() = default;
public:
- virtual ~Codec() { }
+ virtual ~Codec() = default;
/** Returns the name of the encoding handled by this codec. */
virtual const char *get_name() const = 0;
{
public:
codec_error(const std::string &w): std::runtime_error(w) { }
- virtual ~codec_error() throw() { }
+ virtual ~codec_error() throw() = default;
};
{
public:
invalid_character(unichar, const std::string &);
- virtual ~invalid_character() throw() { }
+ virtual ~invalid_character() throw() = default;
};
{
public:
invalid_sequence(const std::string::const_iterator &, const std::string::const_iterator &, const std::string &);
- virtual ~invalid_sequence() throw() { }
+ virtual ~invalid_sequence() throw() = default;
private:
std::string format_sequence(const std::string::const_iterator &, const std::string::const_iterator &);
{
public:
format_error(const std::string &w): std::logic_error(w) { }
- virtual ~format_error() throw() { }
+ virtual ~format_error() throw() = default;
};
{
public:
lexical_error(const std::string &w): runtime_error(w) { }
- virtual ~lexical_error() throw() { }
+ virtual ~lexical_error() throw() = default;
};
{
public:
format_mismatch(const std::string &w): lexical_error(w) { }
- virtual ~format_mismatch() throw() { }
+ virtual ~format_mismatch() throw() = default;
};
{
public:
bad_regex(const std::string &, const std::string &, const std::string::const_iterator &);
- virtual ~bad_regex() throw() { }
+ virtual ~bad_regex() throw() = default;
private:
std::string make_where(const std::string &, const std::string::const_iterator &);
public:
/** Constructs a RegMatch representing a non-match. */
- RegMatch() { }
+ RegMatch() = default;
/** Constructs a new RegMatch from a string and groups. The length and str
members of each group are computed and need not be set. Intended to be used
public:
/** Constructs a zero TimeDelta. */
- TimeDelta() { }
+ TimeDelta() = default;
/** Constructs a TimeDelta from a plain number. The purpose of this is to
allow serialization together with the raw() function. */
public:
/** Construct a TimeStamp that represents an arbitarily distant point in the
past. It's guaranteed to be less than any valid timestamp. */
- TimeStamp() { }
+ TimeStamp() = default;
/** Constructs a TimeStamp from a plain number. The purpose of this is to allow
serialization together with the raw() function. */