[ 
https://issues.apache.org/jira/browse/LOGCXX-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Schöning resolved LOGCXX-374.
--------------------------------------
    Resolution: Cannot Reproduce

Because we are trying to reduce the backlog of open issues, I'm closing this 
one right now. The described environment in which the problem has been reported 
originally is pretty outdated these days and things might have been fixed 
already with a newer version of log4cxx and/or a new environment. If this 
concrete problem is still relevant for someone, feel free to reopen and provide 
the necessary details. Otherwise it's best to create a new issue describing the 
new environment and problem.

> Compile error when using quoted string and endl in log message
> --------------------------------------------------------------
>
>                 Key: LOGCXX-374
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-374
>             Project: Log4cxx
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: OpenSuSE 11.2: Linux dop131 2.6.31.14-0.4-default #1 SMP 
> 2010-10-25 08:45:30 +0200 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Marcel Loose
>            Assignee: Curt Arnold
>            Priority: Major
>
> The following program fails to compile, both with version 0.10.0 and the svn 
> trunk.
> #include <log4cxx/logger.h>
> #include <log4cxx/basicconfigurator.h>
> #include <iostream>
> using namespace std;
> using namespace log4cxx;
> int main()
> {
>   BasicConfigurator::configure();
>   LoggerPtr logger = Logger::getLogger("main");
>   const int theAnswer = 42;
>   LOG4CXX_DEBUG(logger, "Hello world" << endl);  // <-- This line causes 
> compile error
>   LOG4CXX_DEBUG(logger, theAnswer << endl);
>   LOG4CXX_DEBUG(logger, "Hello world, " << theAnswer << " is the answer" << 
> endl);
> }
> Strange enough, only line 13 causes a compile error, lines 14 and 15 are fine!
> Here's the compiler error:
> main.cc: In function 'int main()':
> main.cc:13: error: no match for 'operator<<' in 
> 'oss_.log4cxx::helpers::MessageBuffer::operator<<(((const char*)"Hello 
> world")) << std::endl'
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:54:
>  note: candidates are: log4cxx::helpers::CharMessageBuffer& 
> log4cxx::helpers::CharMessageBuffer::operator<<(const std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >&)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:60:
>  note:                 log4cxx::helpers::CharMessageBuffer& 
> log4cxx::helpers::CharMessageBuffer::operator<<(const char*)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:66:
>  note:                 log4cxx::helpers::CharMessageBuffer& 
> log4cxx::helpers::CharMessageBuffer::operator<<(char*)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:73:
>  note:                 log4cxx::helpers::CharMessageBuffer& 
> log4cxx::helpers::CharMessageBuffer::operator<<(char)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:80:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(std::ios_base& 
> (*)(std::ios_base&))
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:86:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(bool)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:93:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(short int)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:99:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(int)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:105:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(unsigned int)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:111:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(long int)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:117:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(long unsigned int)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:123:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(float)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:129:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(double)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:135:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(long double)
> /export/home/loose/x86_64/usr/local/log4cxx-trunk/include/log4cxx/helpers/messagebuffer.h:141:
>  note:                 std::ostream& 
> log4cxx::helpers::CharMessageBuffer::operator<<(void*)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to