use anonymous namespace to manage visibility of multiple copies of parse_error class

This commit is contained in:
Axel Kohlmeyer
2021-10-22 16:14:06 -04:00
parent c08093f768
commit 47eab736bb
10 changed files with 73 additions and 43 deletions

View File

@ -43,12 +43,14 @@
using namespace LAMMPS_NS;
using namespace FixConst;
class parser_error : public std::exception {
std::string message;
public:
parser_error(const std::string &mesg) { message = mesg; }
const char *what() const noexcept { return message.c_str(); }
};
namespace {
class parser_error : public std::exception {
std::string message;
public:
parser_error(const std::string &mesg) { message = mesg; }
const char *what() const noexcept { return message.c_str(); }
};
}
static const char cite_fix_acks2_reax[] =
"fix acks2/reaxff command:\n\n"