You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Christopher Crotty <ch...@verizon.net> on 2008/12/08 23:51:22 UTC

error when class containing logger is added to vector container

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
-I./Server -I./Util -DLINUX -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -Wall
-O0 -m32 -march=i386 -o ./build/release/IQConnectionTable.o
Server/IQConnectionTable.cpp

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/sstr
eam.tcc: 

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

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/sstr
eam.tcc:114: 

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),
__size_type(512)); 

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

 

Any suggestions on how I can overcome this?

 

Thanks,

Chris