mire787 / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

missed 'google' namespace #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the code snippet there is a missing of namespace 'google' on L668 and 
L669 in logging.h.
This will result in compilition error with -DNDEBUG when use CHECK_XX.

         google::Check##name##Impl(GetReferenceableValue(val1), \
                           GetReferenceableValue(val2), \
should be 
         google::Check##name##Impl(google::GetReferenceableValue(val1), \
                           google::GetReferenceableValue(val2), \
-------------------------------------------------------------
// The meaning of "string" might be different between now and 
// when this macro gets invoked (e.g., if someone is experimenting
// with other string implementations that get defined after this
// file is included).  Save the current meaning now and use it 
// in the macro.
typedef std::string _Check_string;
#define CHECK_OP_LOG(name, op, val1, val2, log) \
  while (google::_Check_string* _result =                \
         google::Check##name##Impl(                      \
             google::GetReferenceableValue(val1),        \
             google::GetReferenceableValue(val2),        \
             #val1 " " #op " " #val2))                                  \
    log(__FILE__, __LINE__,                                             \
        google::CheckOpString(_result)).stream()
#else
// In optimized mode, use CheckOpString to hint to compiler that
// the while condition is unlikely.
#define CHECK_OP_LOG(name, op, val1, val2, log) \
  while (google::CheckOpString _result = \
         google::Check##name##Impl(GetReferenceableValue(val1), \
                           GetReferenceableValue(val2), \
                           #val1 " " #op " " #val2)) \
    log(__FILE__, __LINE__, _result).stream()
#endif  // STATIC_ANALYSIS, !NDEBUG
-------------------------------------------------------------

Original issue reported on code.google.com by owandyw...@gmail.com on 10 Feb 2010 at 7:57

GoogleCodeExporter commented 8 years ago
I think this was fixed in Issue 19. You won't see this issue in the next 
release. For 
now, please use SVN head to avoid this issue. Thanks for the report!

Original comment by shinichi...@gmail.com on 15 Feb 2010 at 7:21