Re: problem porting my application to new gcc (non-const reference )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30 March 2011 11:30, Mahmood Naderan wrote:
> I rewrte the neccessary funtion definitions again to be clear:

...
> static API::conf_object_t * constructor(API::parse_object_t * aParseObject) {

OK, this is a static function, that's what I was asking.

>   template <class CppObjectClass >
>   class Factory {
>     typedef Class<CppObjectClass> class_;
>     class_ * theClass;
>      public:
>     Factory() {
>       static class_ theStaticClass;
>       theClass = &theStaticClass;
>     }
>     typename class_::object_type create(std::string aSimName) {
>       API::conf_object_t * object = aux_::NewObject_stub(
>         const_cast<API::conf_class_t *>( theClass->getSimClass() ), aSimName,
> theClass->constructor);

What if you change theClass->constructor to &class_::constructor instead?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux