Support Class Library
A set of tools providing classes and utility
InvalidCast.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <scl/macros.h>
5 
6 namespace scl{
7  namespace exceptions{
11  class InvalidCast : public Exception{
12  public:
14  realConst(char*) type() const noexcept override{
15  return "scl::exceptions::InvalidCast";
16  }
17  };
18  }
19 }
Global namespace of the SCL.
Definition: alias.hpp:3
#define realConst(type)
Definition: macros.h:3
Exception(T &&reason)
Construct an scl::exceptions::Exception from an error message.
Definition: Exception.h:27
Base class for all regular exceptions.
Definition: Exception.h:12
Exception class used when a conversion is impossible.
Definition: InvalidCast.h:11
const char *const type() const noexcept override
A string describing the name of the exception class.
Definition: InvalidCast.h:14