|
Boost : |
From: Marat Khalili (0x8.0p15_at_[hidden])
Date: 2007-08-22 15:00:35
Iain Denniston wrote:
> Apologies for the delayed response - things got a bit mad here.
>
>> Its argument is <CODE>std::ios_base::fmtflags</CODE> here.
>
> Yes - but fmtflags is simply typedef'd to int somewhere deep in the STL.
> Certainly this is the case with STLPort and the dinkumare STL (built in
> VC version of STL). Hence anything that is an int or can be converted to
> one can be passed as an argument to the function - the precise problem
> I'm trying to fix.
Somehow it doesn't compile here, but it can be a feature of g++.
Unfortunately I have no other compiler to test.
with -pedantic:
> test.cpp:10: error: No match for `ostream::flags(const int &)'
> ios_base.h:550: note: candidates are: _Ios_Fmtflags ios_base::flags() const
> ios_base.h:561: note: _Ios_Fmtflags ios_base::flags(_Ios_Fmtflags) <near match>
without:
> test.cpp:10: error: invalid conversion from `int' to `_Ios_Fmtflags'
> test.cpp:10: error: initializing argument 1 of `_Ios_Fmtflags ios_base::flags(_Ios_Fmtflags)'
If limited to g++ now, then of course same feature for all platforms
will be useful.
With Best Regards,
Marat
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk