29 #include <type_traits>
30 #include <experimental/source_location>
39 template<
class,
class =
void>
53 return p.get() ==
nullptr;
61 template<
class T,
class ExceptionType = std::inval
id_argument>
67 s <<
"Ptr passed to CheckedDeref is NULL"
68 <<
"\nfile : " << loc.file_name()
69 <<
"\nline : " << loc.line()
70 <<
"\nfunction: " << loc.function_name();
71 throw ExceptionType {
s.str()};
75 template<
class T,
class M,
class ExceptionType = std::inval
id_argument>
81 s <<
"Ptr passed to CheckedDeref is NULL"
82 <<
"\nfile : " << loc.file_name()
83 <<
"\nline : " << loc.line()
84 <<
"\nfunction: " << loc.function_name()
85 <<
"\nmessage :\n" << msg;
86 throw ExceptionType {
s.str()};