Boost logo

Boost :

From: Schaible, Joerg (joerg.schaible_at_[hidden])
Date: 2001-01-23 20:24:00


Hello David,

1. boost libraries, STLport
2. partial template definition, incomplete member template support, massive
problems concerning templates & DLLs
3. a lot of macros and #ifdefs cluttered in the headers and source,
additional class definitions as workaround
4. both

I would really appreciate if the support of templates with DLLs will be
improved:

a) needs DLL-interface warning (4251) for all inline (template) classes
without any static member data is unnecessary, a local copy of the instance
does not harm

b) classes with member templates cannot be exported, linker will search
every instance of the member function in original DLL

c) nasty necessity to declarate and export template instances explicitly if
used in an exported class
#pragma warning( disable : 4231 ) // extern template is non-standard
extern template class JsiCLASS std::list< boost::shared_ptr< Option > >;
extern template class JsiCLASS std::list< Argument >;
#pragma warning( default : 4231 ) // extern template is non-standard
class JsiCLASS Options {
        // ...
private:
        std::list< boost::shared_ptr< Option > > myOptions;
        std::list< Argument > myArguments;
};

d) improved quality of C++ headers to compile with warning level 4. Hope
this is history:
// Just to include the VC6 <string> without warnings
#pragma warning( disable : 4018 ) // signed/unsigned mismatch
#pragma warning( disable : 4100 ) // unreferenced parameter
#pragma warning( disable : 4146 ) // unary minus to unsigned
#pragma warning( disable : 4244 ) // conversion from unsigned int to
char
#pragma warning( disable : 4511 ) // copy c'tor not generated
#pragma warning( disable : 4512 ) // assignment not generated
#ifndef INC_STRING
#define INC_STRING
#include <string>
#endif
#pragma warning( default : 4018 ) // signed/unsigned mismatch
#pragma warning( default : 4100 ) // unreferenced parameter
#pragma warning( default : 4146 ) // unary minus to unsigned
#pragma warning( default : 4244 ) // conversion from unsigned int to
char
#pragma warning( default : 4511 ) // copy c'tor not generated
#pragma warning( default : 4512 ) // assignment not generated

e) resolve problems with name lookup:
class Model;
class Controller;
class View : public jsi::base::view<Model, Controller> {
public:
        View(Model& model, HWND hViewParent)
                : jsi::base::view<Model, Controller>(model) {}
        void initialize() {
                // WILL NOT COMPILE:
                // jsi::base::view<Model, Controller>::initialize();
                // HAVE TO WRITE THIS:
                using namespace jsi::base;
                view<Model, Controller>::initialize();
        }
        //...
}

Greetings,
Jorg


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk