Hi All,
I have got two different implementation of C++ Standard Library, and there
are lots of difference between them !!
I have downloaded these two:
gcc-4.0.0.tar.gz
libstdc++-2.8.1.1.tar.gz
For example, In case of gcc-4.0.0.tar.gz,
ifstream is defined as :
typedef basic_fstream<char> fstream; ///< @isiosfwd
And the only two constructers provided by the basic_fstream class are:
basic_fstream()
basic_fstream(const char* __s, ios_base::openmode __mode = ios_base::in |
ios_base::out)
Again, APIs (with parameter) differ in this case..
Where in case of libstdc++-2.8.1.1.tar.gz, its defined like this:
class fstream : public fstreambase, public iostream {
public:
fstream() : fstreambase() { }
fstream(int fd) : fstreambase(fd) { }
fstream(const char *name, int mode, int prot=0664)
: fstreambase(name, mode, prot) { }
fstream(int fd, char *p, int l) : fstreambase(fd, p, l) { } /*Deprecated*/
void open(const char *name, int mode, int prot=0664)
{ fstreambase::open(name, mode, prot); }
};
Which matches with Windows C++ Standard Library.
Now the confusuon is, which one is as per the standard ?
Regards
Girish
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-...@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]