“appel à l'supprimé constructeur de” erreur de compilateur pour le std::runtime_error sous-classe

J'ai dérivé d'une classe d'exception de std::runtime_error afin d'ajouter le support pour la diffusion des exceptions. Je suis une étrange erreur de compilation sortie avec clang que je ne suis pas sûr de la façon de résoudre?

clang++ -std=c++11 -stdlib=libc++ -g -Wall -I../ -I/usr/local/include Main.cpp -c
Main.cpp:43:19: error: call to deleted constructor of 'EarthException'
throw EarthException(__FILE__, __LINE__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../EarthException.hpp:9:12: note: function has been explicitly marked deleted here
struct EarthException : public Exception<EarthException>
template <typename TDerived>
class Exception : public std::runtime_error
{
public:
Exception() : std::runtime_error("") {}
Exception(const std::string& file, const unsigned line)
: std::runtime_error("")
{ 
stream_ << (file.empty() ? "UNNAMED_FILE" : file) << "[" << line << "]: ";
}
virtual ~Exception() {}
template <typename T>
TDerived& operator<<(const T& t)
{
stream_ << t;
return static_cast<TDerived&>(*this);
}
virtual const char* what() const throw()
{
return stream_.str().c_str();
}
private:
std::stringstream stream_;
};
struct EarthException : public Exception<EarthException>
{
EarthException() {}
EarthException(const std::string& file, const unsigned line)
: Exception<EarthException>(file, line) {}
virtual ~EarthException() {}
};
}

Mise à JOUR:

J'ai maintenant ajouté des appels explicites à std::runtime_error("") comme il a été souligné le constructeur par défaut sur cela a été marquée comme =delete cependant l'erreur reste.

OriginalL'auteur Graeme | 2012-08-25