Boost logo

Boost Users :

From: Christian Hoffmann (Christian.Hoffmann_at_[hidden])
Date: 2004-07-21 12:25:06


We have problems here passing the boost::filesystem::native function as
a checker on
WIN32 platform, eg. like this
        boost::filesystem::path path ("d:\hello\hello",

When we take the address of the function
"boost::filesystem::native(...)" in dll A and the pass it to boost
filesystem dll,
the various comparisons with "native" inside
path_posix_windows.cpp:m_path_append ( const std::string & src,
name_check checker ) fail, and
and the code throws an invalid name exception.

(e.g. line 242: if ( (checker == no_check || checker == native) &&
src.size() >= 2 )
 fails as checker != native)

The microsoft compiler takes the address into an internal function
instead of the adress of the "real" boost::filesystem::native ()
function, so the comparison can never be true.

Anybody got an idea what to do?

PS: Getting the address of the native function like this works:

path ("d:\hello\hell",

But is not really an option...

Christian Hoffmann
This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at