logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Crotty" <christopher_cro...@verizon.net>
Subject error when class containing logger is added to vector container
Date Mon, 08 Dec 2008 22:51:22 GMT
I am building a Linux application that makes use of the log4cxx logging
libraries. I'm building this app on a RHEL 5.2 under gcc4.1.2


I have several C++ classes that use the library with no problem. I started
adding the LOG4CXX_<>() calls to a class that can be stored in a container
class that wrappers <vector>. Now when compiling this container class I get
the following compile error:


g++ -c -I/usr/include -Ixerces/include -I/usr/include/mysql
-Ilog4cxx/linux/include -I. -I./API -I./API_Includes -I./Data -I./General
-O0 -m32 -march=i386 -o ./build/release/IQConnectionTable.o


In member function 'virtual typename std::basic_stringbuf<_CharT, _Traits,
_Alloc>::int_type std::basic_stringbuf<_CharT, _Traits,
_Alloc>::overflow(typename _Traits::int_type)':


error: expected unqualified-id before '(' token

make: *** [Server/IQConnectionTable.o] Error 1


The class itself can compile fine, it is the container class that seems to
be having the problem.


The above line in error is

// NB: Start ostringstream buffers at 512 chars. This is an 

// experimental value (pronounced "arbitrary" in some of the 

// hipper english-speaking countries), and can be changed to 

// suit particular needs.

// Then, in virtue of DR 169 (TC) we are allowed to grow more 

// than one char.

const __size_type __opt_len = std::max(__size_type(2 * __capacity),

const __size_type __len = std::min(__opt_len, __max_size); <-- (compile
fails here)


Any suggestions on how I can overcome this?







View raw message