Skip to content

Commit f1e9b5d

Browse files
committed
Add back _DECL to exception classes to avoid warnings when an exported class inherits from a non-exported one
1 parent df8412f commit f1e9b5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/program_options/errors.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace boost { namespace program_options {
3535
}
3636

3737
/** Base class for all errors in the library. */
38-
class BOOST_SYMBOL_VISIBLE error : public std::logic_error {
38+
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE error : public std::logic_error {
3939
public:
4040
error(const std::string& xwhat) : std::logic_error(xwhat) {}
4141
};
@@ -44,23 +44,23 @@ namespace boost { namespace program_options {
4444
/** Class thrown when there are too many positional options.
4545
This is a programming error.
4646
*/
47-
class BOOST_SYMBOL_VISIBLE too_many_positional_options_error : public error {
47+
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE too_many_positional_options_error : public error {
4848
public:
4949
too_many_positional_options_error()
5050
: error("too many positional options have been specified on the command line")
5151
{}
5252
};
5353

5454
/** Class thrown when there are programming error related to style */
55-
class BOOST_SYMBOL_VISIBLE invalid_command_line_style : public error {
55+
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE invalid_command_line_style : public error {
5656
public:
5757
invalid_command_line_style(const std::string& msg)
5858
: error(msg)
5959
{}
6060
};
6161

6262
/** Class thrown if config file can not be read */
63-
class BOOST_SYMBOL_VISIBLE reading_file : public error {
63+
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE reading_file : public error {
6464
public:
6565
reading_file(const char* filename)
6666
: error(std::string("can not read options configuration file '").append(filename).append("'"))

0 commit comments

Comments
 (0)