based on review discussions. it makes sense as we cannot assume its address
is never needed in non test applications.
} // end of unnamed namespace
+// Explicit definition of class static constant. The value is given in the
+// declaration so it's not needed here.
+const int InputSource::END_OF_STREAM;
+
InputSource::InputSource(std::istream& input_stream) :
at_eof_(false),
line_(1),
class InputSource {
public:
/// \brief Returned by getChar() when end of stream is reached.
+ ///
+ /// \note C++ allows a static const class member of an integral type to
+ /// be used without explicit definition as long as its address isn't
+ /// required. But, since this is a public member variable and we cannot
+ /// assume how it's used, we give a definition in the implementation.
static const int END_OF_STREAM = -1;
/// \brief Exception thrown when ungetChar() is made to go before
using namespace isc::dns;
using namespace isc::dns::master_lexer_internal;
-// Some compilers cannot find symbols of class constants when used in the
-// EXPECT_xxx macros, so we need explicit declaration.
-const int InputSource::END_OF_STREAM;
-
namespace {
class InputSourceTest : public ::testing::Test {