stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-160) ambiguity on operator+ (fpos, streamoff) in filebuf::sync()
Date Fri, 03 Mar 2006 21:22:39 GMT
ambiguity on operator+ (fpos, streamoff) in filebuf::sync()
-----------------------------------------------------------

         Key: STDCXX-160
         URL: http://issues.apache.org/jira/browse/STDCXX-160
     Project: C++ Standard Library
        Type: Bug
  Components: 27. Input/Output  
    Versions: 4.1.3    
 Environment: all
    Reporter: Martin Sebor
 Assigned to: Martin Sebor 
    Priority: Minor
     Fix For: 4.1.4


The program below fails to compile on Solaris:

$ cat t.cpp && make t
#include <fstream>

struct Traits: std::char_traits<char>
{
    typedef long off_type;
};

int main ()
{
    std::basic_filebuf<char, Traits> fb;
}
gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG   -pthreads -D_RWSTD_USE_CONFIG
-I/build/sebor/gcc-4.0.2-15s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/../rwtest
-I/build/sebor/dev/stdlib/../rwtest/include -I/build/sebor/dev/stdlib/tests/include  -pedantic
-nostdinc++ -g  -W -Wall -Wextra -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
 t.cpp
/build/sebor/dev/stdlib/include/fstream.cc: In member function `std::basic_streambuf<_CharT,
_Traits>* std::basic_filebuf<_CharT, _Traits>::setbuf(_CharT*, std::streamsize) [with
_CharT = char, _Traits = Traits]':
/build/sebor/dev/stdlib/include/fstream:109:   instantiated from `std::basic_filebuf<_CharT,
_Traits>::basic_filebuf() [with _CharT = char, _Traits = Traits]'
t.cpp:10:   instantiated from here
/build/sebor/dev/stdlib/include/fstream.cc:524: warning: comparison between signed and unsigned
integer expressions
/build/sebor/dev/stdlib/include/fstream:109:   instantiated from `std::basic_filebuf<_CharT,
_Traits>::basic_filebuf() [with _CharT = char, _Traits = Traits]'
t.cpp:10:   instantiated from here
/build/sebor/dev/stdlib/include/fstream.cc:538: warning: comparison between signed and unsigned
integer expressions
/build/sebor/dev/stdlib/include/fstream.cc: In member function `int std::basic_filebuf<_CharT,
_Traits>::sync() [with _CharT = char, _Traits = Traits]':
/build/sebor/dev/stdlib/include/fstream.cc:517:   instantiated from `std::basic_streambuf<_CharT,
_Traits>* std::basic_filebuf<_CharT, _Traits>::setbuf(_CharT*, std::streamsize) [with
_CharT = char, _Traits = Traits]'
/build/sebor/dev/stdlib/include/fstream:109:   instantiated from `std::basic_filebuf<_CharT,
_Traits>::basic_filebuf() [with _CharT = char, _Traits = Traits]'
t.cpp:10:   instantiated from here
/build/sebor/dev/stdlib/include/fstream.cc:696: warning: comparison between signed and unsigned
integer expressions
/build/sebor/dev/stdlib/include/fstream.cc:517:   instantiated from `std::basic_streambuf<_CharT,
_Traits>* std::basic_filebuf<_CharT, _Traits>::setbuf(_CharT*, std::streamsize) [with
_CharT = char, _Traits = Traits]'
/build/sebor/dev/stdlib/include/fstream:109:   instantiated from `std::basic_filebuf<_CharT,
_Traits>::basic_filebuf() [with _CharT = char, _Traits = Traits]'
t.cpp:10:   instantiated from here
/build/sebor/dev/stdlib/include/fstream.cc:764: error: ambiguous overload for 'operator+'
in '((std::basic_filebuf<char, Traits>*)this)->std::basic_filebuf<char, Traits>::_C_beg_pos
+ __ext_chars'
/build/sebor/dev/stdlib/include/fstream.cc:764: note: candidates are: operator+(int, long
int) <built-in>
/build/sebor/dev/stdlib/include/rw/_traits.h:256: note:                 std::fpos<_StateT>
std::fpos<_StateT>::operator+(int) const [with _StateT = __mbstate_t]
/build/sebor/dev/stdlib/include/fstream.cc: In member function `typename std::basic_filebuf<_CharT,
_Traits>::int_type std::basic_filebuf<_CharT, _Traits>::underflow() [with _CharT
= char, _Traits = Traits]':
t.cpp:10:   instantiated from here
/build/sebor/dev/stdlib/include/fstream.cc:169: warning: comparison between signed and unsigned
integer expressions
make: *** [t.o] Error 1


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message