build: workaround gcc synthesis constructor cast warnings

This commit is contained in:
Danny Robson 2016-10-11 21:43:28 +11:00
parent 98350fedab
commit 68fa98e70e
3 changed files with 16 additions and 6 deletions

View File

@ -115,7 +115,7 @@ namespace util { namespace cmdopt {
class bytes : public value<size_t> {
public:
using value<size_t>::value;
bytes (size_t &_value): value (_value) { }
using value<size_t>::execute;
void execute (const char *restrict) override;

View File

@ -24,13 +24,17 @@
namespace json {
/// The base class for all exceptions throw directly by the json namespace.
struct error : public std::runtime_error {
using runtime_error::runtime_error;
error (const std::string &what):
runtime_error (what)
{ ; }
};
/// Base class for all type conversion errors
struct type_error : public error {
using error::error;
type_error (const std::string &what):
error (what)
{ ; }
};
@ -47,7 +51,9 @@ namespace json {
/// Base class for errors thrown during schema validation
struct schema_error : public error {
using error::error;
schema_error (const std::string &what):
error (what)
{ ; }
};

View File

@ -28,13 +28,17 @@
///////////////////////////////////////////////////////////////////////////////
struct length_error : public json::schema_error {
using schema_error::schema_error;
length_error (const std::string &what):
schema_error (what)
{ ; }
};
//-----------------------------------------------------------------------------
struct format_error : public json::schema_error {
using schema_error::schema_error;
format_error (const std::string &what):
schema_error (what)
{ ; }
};