Actions
Bug #3834
closedNDN_LOG causes compilation error on OSX 10.10 with boost 1.59.0
Start date:
Due date:
% Done:
0%
Estimated time:
Description
In util/logger.hpp, we have a workaround for Boost Ticket 11549. But this workaround methods somehow failed to work on OSX 10.10 with boost version 1.59.0.
../tests/unit-tests/util/log-module2.cpp:33:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
NDN_LOG_TRACE("trace" << 2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:137:35: note: expanded from macro 'NDN_LOG_TRACE'
#define NDN_LOG_TRACE(expression) NDN_LOG(TRACE, TRACE, expression)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/log/utility/formatting_ostream.hpp:377:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'ios_base_manip' (aka 'std::ios_base &(*)(std::ios_base &)') for 1st argument
basic_formatting_ostream& operator<< (ios_base_manip manip)
^
/opt/local/include/boost/log/utility/formatting_ostream.hpp:382:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'basic_ios_manip' (aka 'std::basic_ios<char_type, traits_type> &(*)(std::basic_ios<char_type, traits_type> &)') for 1st argument
basic_formatting_ostream& operator<< (basic_ios_manip manip)
^
/opt/local/include/boost/log/utility/formatting_ostream.hpp:387:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'stream_manip' (aka 'ostream_type &(*)(ostream_type &)') for 1st argument
basic_formatting_ostream& operator<< (stream_manip manip)
...
/opt/local/include/boost/log/utility/formatting_ostream.hpp:802:1: note: candidate template ignored: substitution failure [with StreamT = boost::log::v2_mt_posix::basic_record_ostream<char> &, T = ndn::util::LoggerTimestamp]: no type named 'type' in 'boost::log::v2_mt_posix::aux::enable_if_formatting_ostream<boost::log::v2_mt_posix::basic_record_ostream<char> &, boost::log::v2_mt_posix::basic_record_ostream<char> &>'
operator<< (StreamT&& strm, T const& value)
^
../tests/unit-tests/util/log-module2.cpp:34:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
NDN_LOG_DEBUG("debug" << 2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:142:35: note: expanded from macro 'NDN_LOG_DEBUG'
#define NDN_LOG_DEBUG(expression) NDN_LOG(DEBUG, DEBUG, expression)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/log/utility/formatting_ostream.hpp:377:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'ios_base_manip' (aka 'std::ios_base &(*)(std::ios_base &)') for 1st argument
basic_formatting_ostream& operator<< (ios_base_manip manip)
...
../tests/unit-tests/util/log-module2.cpp:35:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
NDN_LOG_INFO("info" << 2);
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:147:34: note: expanded from macro 'NDN_LOG_INFO'
#define NDN_LOG_INFO(expression) NDN_LOG(INFO, INFO, expression)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
../tests/unit-tests/util/log-module1.cpp:38:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
NDN_LOG_FATAL("fatal" << 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:162:35: note: expanded from macro 'NDN_LOG_FATAL'
#define NDN_LOG_FATAL(expression) NDN_LOG(FATAL, FATAL, expression)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
...
6 errors generated.
Actions