
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolved: |
19/Jan/07 11:03 PM
|
| Resolution Date: |
19/Jan/07 11:03 PM
|
depr.ios.members, p2 requires that std::ios_base::io_state be an integer type. The program below fails to compile, indicating that in stdcxx it is not:
$ cat t.cpp && make t
#include <ios>
int main ()
{
const int i = 1;
std::ios_base::io_state s = i;
}
eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3 -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815 --diag_suppress 177,381,191,68,550,611,997,549 t.cpp
"t.cpp", line 6: error #144: a value of type "int" cannot be used to
initialize an entity of type "std::ios_base::io_state"
std::ios_base::io_state s = i;
^
1 error detected in the compilation of "t.cpp".
make: *** [t.o] Error 2
|
|
Description
|
depr.ios.members, p2 requires that std::ios_base::io_state be an integer type. The program below fails to compile, indicating that in stdcxx it is not:
$ cat t.cpp && make t
#include <ios>
int main ()
{
const int i = 1;
std::ios_base::io_state s = i;
}
eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3 -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815 --diag_suppress 177,381,191,68,550,611,997,549 t.cpp
"t.cpp", line 6: error #144: a value of type "int" cannot be used to
initialize an entity of type "std::ios_base::io_state"
std::ios_base::io_state s = i;
^
1 error detected in the compilation of "t.cpp".
make: *** [t.o] Error 2 |
Show » |
|
$ cat t.cpp && make t
#include <ios>
void foo (std::ios::io_state, std::ios::open_mode, std::ios::seek_dir) { }
int main ()
{
foo (1, 2, 3);
}
eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3 -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815 --diag_suppress 177,381,191,68,550,611,997,549 t.cpp
"t.cpp", line 7: error #167: argument of type "int" is incompatible with
parameter of type "std::ios_base::io_state"
foo (1, 2, 3);
^
"t.cpp", line 7: error #167: argument of type "int" is incompatible with
parameter of type "std::ios_base::open_mode"
foo (1, 2, 3);
^
"t.cpp", line 7: error #167: argument of type "int" is incompatible with
parameter of type "std::ios_base::seek_dir"
foo (1, 2, 3);
^
3 errors detected in the compilation of "t.cpp".
make: *** [t.o] Error 2