ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] Compile failure with object in V2
by Dave Hawkes other posts by this author
Jul 13 2002 11:04PM messages near this date
Re: [C++-sig] Building on Windows from CVS | Re: [C++-sig] Re: Re: Compile failure with object in V2
I was working on some tests for the the boost components I've been working
on and came across this issue.

If an object is initialised with a class that is a sub class of another a
compiler error results, though I'm not sure if this is a specific problem
with VC6:

ie

#include ...

class c1 {
public:
    c1() {}
    class c2 {
    public:
        c2() {}
    };
    c2 t;
};

...

int main(int argc, char* argv[])
{
    c1 x;
    object o(x.t);
    return 0;
}

will result in:

boost\python\object_core.hpp(220) : error C2275: 'c1::c2' : illegal use of
this type as an expression
        test.cpp : see reference to function template instantiation
'__thiscall boost::python::api::object::boost::python::api::object(const
class c1::c2 &)' being compiled

Line 220 is the object constructor, but I'm not sure what part of it the
compiler is objecting to.

Dave Hawkes







_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Dave Hawkes
David Abrahams
Dave Hawkes
David Abrahams
Dave Hawkes
David Abrahams
Dave Hawkes
David Abrahams
Dave Hawkes
David Abrahams
Dave Hawkes
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved