c++.stlsoft - API inconsistencies between platformstl::path and winstl::path
- Adi Shavit (23/23) Aug 09 2010 Hi,
Hi, Using stlsoft-1.9.97: this program has 2 lines that don't compile on MSVC 6.0: #include <platformstl/filesystem/path.hpp> #include <winstl/filesystem/path.hpp> int main() { //winstl::path wpath0 = "."; // Does not compile: //// error C2440: 'initializing' : cannot convert from 'char [2]' to //// 'class stlsoft::winstl_project::basic_path<char,struct stlsoft::winstl_project::filesystem_traits<char>,class stlsoft::winstl_project::processheap_allocator<char> >' //// No constructor could take the source type, or constructor overload resolution was ambiguous winstl::path wpath1("."); winstl::path wpath2; wpath2 = wpath1; // OK wpath2 = wpath1.c_str(); // OK platformstl::path ppath0 = "."; platformstl::path ppath1("."); platformstl::path ppath2; //ppath2 = ppath1; // Does not compile: error C2593: 'operator =' is ambiguous ppath2 = ppath1.c_str(); // OK return 0; } It seems that platformstl::path and winstl::path are not identical in their behaviour. Adi
Aug 09 2010