diff --git a/include/boost/program_options/detail/config_file.hpp b/include/boost/program_options/detail/config_file.hpp index 808bec7f1..fae95d800 100644 --- a/include/boost/program_options/detail/config_file.hpp +++ b/include/boost/program_options/detail/config_file.hpp @@ -71,7 +71,10 @@ namespace boost { namespace program_options { namespace detail { : public eof_iterator { public: - common_config_file_iterator() { found_eof(); } + common_config_file_iterator() { + allow_unregistered = false + found_eof(); + } common_config_file_iterator( const std::set& allowed_options, bool allow_unregistered = false);