I lost my copy of metaprogramming. I'm ordering another tomorrow. But
here is what I'm up to.
I've been doing the virtual path thing with old MFC classes and such, like:
C:\\cpp\\RA_User_2_2\\$(TEST)
or
$(PATH)\$(TEST) etc.
What I'm trying to do is derive from filesystem and wrap this virtual
stuff around it to break away from the old stuff I have, (ugly stuff).
I've gotten to the point where I'd like to snap different virtual sets
in and don't want to build on the old stuff, filesystem is really cool.
I have a client that has several clients and wants to set his
configurations on the fly to handle them, I do it in code for myself,
but it is not runtime. Anyway...
So I started with:
template
template
class basic_vpath; typedef basic_vpath< std::string, path_traits > vpath; template
class basic_vpath :public basic_path< String, Traits > { }; But I don't understand why I can just fine: CString strUserDirectory= _T("C:\\cpp\\RA_User_2_2\\$(TEST)"); path aPath( strUserDirectory );
But can't convert from CString, or even std::string with:
CString strUserDirectory= _T("C:\\cpp\\RA_User_2_2\\$(TEST)"); vpath aPath( strUserDirectory );
Does vpath class have a constructor that takes CString or LPTCSTR?
Igor R wrote:
template
class basic_vpath; typedef basic_vpath< std::string, path_traits> vpath; template
class basic_vpath :public basic_path< String, Traits> { }; But I don't understand why I can just fine: CString strUserDirectory= _T("C:\\cpp\\RA_User_2_2\\$(TEST)"); path aPath( strUserDirectory );
But can't convert from CString, or even std::string with:
CString strUserDirectory= _T("C:\\cpp\\RA_User_2_2\\$(TEST)"); vpath aPath( strUserDirectory );
Does vpath class have a constructor that takes CString or LPTCSTR?
Hi,
From what I see, basic_path will with < std::string, path_traits > (
from path.hpp). I'm deriving from basic_path and using that constructor.
This line 'looks' to work fine for path:
typedef basic_path< std::string, path_traits > path;
But I get the error:
'basic_vpath
Igor R wrote:
From what I see, basic_path will with< std::string, path_traits> ( from path.hpp). I'm deriving from basic_path and using that constructor.
I don't know what you mean by saying "using that constructor", but note that in C++ constructors are not inherited.
Thanks Igor,
I guess I need a good head slap. The error was cryptic. This works:
template
participants (2)
-
Dan Bloomquist
-
Igor R