Opened 15 years ago

Closed 14 years ago

#1589 closed Bugs (fixed)

[filesystem] 'mbstate_t' : is not a member of 'std'

Reported by: faridz@… Owned by: Beman Dawes
Milestone: Boost 1.36.0 Component: filesystem
Version: Boost Development Trunk Severity: Showstopper
Keywords: Cc: Beman Dawes

Description

The stdcxx is the another implementation of the STL (initially based on RogueWave STL).

The following errors are encountered when running boost regression tests on msvc with stdcxx-4.2.0.

path.cpp
..\libs\filesystem\src\path.cpp(40) : error C2039: 'mbstate_t' : is not a member of 'std'
..\libs\filesystem\src\path.cpp(40) : error C2065: 'mbstate_t' : undeclared identifier
..\libs\filesystem\src\path.cpp(43) : error C2039: 'mbstate_t' : is not a member of 'std'
..\libs\filesystem\src\path.cpp(45) : error C2039: 'mbstate_t' : is not a member of 'std'
..\libs\filesystem\src\path.cpp(46) : error C3206: 'std::use_facet' : invalid template argument for '_Facet', missing template argument list on class template 'std::codecvt'
        D:\stdcxx\4.2.x\include\loc/_locale.h(82) : see declaration of 'std::use_facet'
..\libs\filesystem\src\path.cpp(46) : fatal error C1903: unable to recover fromprevious error(s); stopping compilation

The proposed patch:

Index: libs/filesystem/src/path.cpp
===================================================================
--- libs/filesystem/src/path.cpp	(revision 42908)
+++ libs/filesystem/src/path.cpp	(working copy)
@@ -24,6 +24,8 @@
 #include <boost/cerrno.hpp>
 #include <boost/system/error_code.hpp>
 
+#include <cwchar>      // fot std::mbstate_t
+
 namespace
 {
   // std::locale construction can throw (if LC_MESSAGES is wrong, for example),

Change History (5)

comment:1 by faridz@…, 15 years ago

An another errors:

fstream_test.cpp
d:\boost\boost\libs\filesystem\test\lpath.hpp(22) : error C2146: syntax error : missing ';' before identifier 'off_type'
d:\boost\boost\libs\filesystem\test\lpath.hpp(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\boost\boost\libs\filesystem\test\lpath.hpp(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

The proposed patch:

Index: libs/filesystem/test/lpath.hpp
===================================================================
--- libs/filesystem/test/lpath.hpp	(revision 42908)
+++ libs/filesystem/test/lpath.hpp	(working copy)
@@ -10,6 +10,7 @@
 
 #include <boost/filesystem/path.hpp>
 #include <string>
+#include <ios>         // for std::streamoff
 
 namespace std
 {

comment:2 by faridz@…, 15 years ago

The error in wide_test.cpp:

wide_test.cpp
..\libs\filesystem\test\wide_test.cpp(109) : error C2039: 'mbstate_t' : is not a member of 'std'
..\libs\filesystem\test\wide_test.cpp(136) : error C2039: 'hex' : is not a member of 'std'
..\libs\filesystem\test\wide_test.cpp(136) : error C2065: 'hex' : undeclared identifier
..\libs\filesystem\test\wide_test.cpp(137) : error C2039: 'dec' : is not a member of 'std'
..\libs\filesystem\test\wide_test.cpp(137) : error C2065: 'dec' : undeclared identifier

The proposed patch:

Index: libs/filesystem/test/wide_test.cpp
===================================================================
--- libs/filesystem/test/wide_test.cpp	(revision 42908)
+++ libs/filesystem/test/wide_test.cpp	(working copy)
@@ -30,7 +30,7 @@
 namespace fs = boost::filesystem;
 
 #include <iostream>
-#include <iomanip>
+#include <ios>    // for std::hex, std::dec
 #include <string>
 #include <cerrno>

comment:3 by faridz@…, 14 years ago

Ping.

comment:4 by faridz@…, 14 years ago

Possibly this can be done in 1.35.1 release?

comment:5 by Beman Dawes, 14 years ago

Resolution: fixed
Status: newclosed

Fixed. Please reopen if the changes don't solve the problem.

Thanks,

--Beman

Note: See TracTickets for help on using tickets.