|
Boost : |
From: Michael Glassford (glassfordm_at_[hidden])
Date: 2004-07-28 10:33:52
Sven Johannsen wrote:
> Hi,
>
> with the current cvs-version (7/23/2004) i can't build the thread
> library with stlport 4.5.3 and msvc60.
>
> I use the following bjam command:
> bjam "-sTOOLS=msvc-stlport" "-sSTLPORT_PATH=D:\develop\STLPort"
> "-sSTLPORT_VERSION=4.5.3"
>
> and get the following errortext:
> ....\boost-23072004\libs\thread\build\..\src\barrier.cpp(21) : error
> C2440: 'type cast' : 'char [22]' kann nicht in 'class
> _STL::invalid_argument' konvertiert werden
> Quelltyp konnte von keinem Konstruktor angenommen werden, oder die
> Ueberladungsaufloesung des Konstruktors ist mehrdeutig
>
> Sorry about the german error-text. it's something about: can't convert
> char[22] to 'class _STL::invalid_argument'
> I don't know that wrong about:
> throw std::invalid_argument("count cannot be zero.");
>
> because the StlPort defines invalid_argument as:
>
> class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error {
> public:
> invalid_argument(const string& __arg) : logic_error(__arg) {}
> # ifdef _STLP_OWN_IOSTREAMS
> ~invalid_argument() _STLP_NOTHROW_INHERENTLY;
> # endif
> };
Is that the complete definition?
> With the microsoft stl everything compile fine. (bjam "-sTOOLS=msvc")
Google tells me that this "Quelltyp konnte von keinem Konstruktor
angenommen werden, oder die Ueberladungsaufloesung des Konstruktors ist
mehrdeutig"?" translates to "Source type could be accepted by no
constructor, or the dissolution of overloading of the constructor is
ambiguous." From this, I would guess either that the invalid_argument
class has another constructor that you didn't show that is making the
conversion ambiguous, or that the string class either has no constructor
that takes a single char* argument, or else that constructor is marked
"explicit", or else there are multiple constructors and the choice
between them is ambiguous.
Mike
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk