-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 04/14/2016 04:52 PM, Jonathan Wakely wrote:
On 14/04/16 15:47 +0100, Jonathan Wakely wrote:
> On 14/04/16 15:42 +0100, Jonathan Wakely wrote:
>> On 14/04/16 06:34 -0400, Igor Gnatenko wrote:
>>> ascxx/curve.h: class Curve : public Instanc{ friend class
>>> std::vector<Curve>; private: friend class Plot; explicit
>>> Curve(const Instanc &); Curve(); public: Curve(const Curve
>>> &); std::vector<double> x; std::vector<double> y; const
>>> std::string getLegend() const;
>>>
>>> /** Get the curve format string, as used by matplotlib.
>>> Documented here:
>>>
>>>
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes....
>>>
>>>
>>>
>>>
(This value is not used by the Tcl/Tk GUI.)
>>> */ const std::string getFormat() const; };
>>>
>>> ascxx/ascpy.i: %ignore Curve::Curve();
>>>
>>> %include "curve.h"
>>>
>>>
>>> It should be ignored by SWIG, but looks like it's not...
>>
>> I don't think that's the problem.
>>
>> In C++98 constructing std::vector<X> v(1); would invoke X's
>> default constructor in the caller's context, so if the default
>> constructor is private then the caller must be a member or
>> friend of X.
>>
>> In C++11 the default constructor will be invoked deep inside
>> std::vector, or one of its helper functions.
>>
>> The code is basically invalid in C++11. It should either make
>> the default constructor public (the simplest fix), or change
>> how the vector is constructed (which seems to come from Swig,
>> so might be difficult).
>
> Having managed to do a mock build (very slow wifi in the building
> I'm in now) I see the error comes from this line, where arg1 is
> vector<Curve>::size_type:
>
> result = (std::vector< Curve > *)new std::vector< Curve >(arg1);
>
> Which is exactly what I guessed. That is not valid C++11 if the
> Curve default constructor is private.
I can also confirm that making the Curve default constructor
public allows the build to complete.
--
Ehm ...
How exactly?
Thanks for yours replies.
- --
- ---
Antonio Trande
mailto: sagitter 'at' fedoraproject 'dot' org
http://fedoraos.wordpress.com/
https://fedoraproject.org/wiki/User:Sagitter
GPG Key: 0x6CE6D08A
Check on
https://keys.fedoraproject.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJXD8V7AAoJELbsjn1s5tCKeHsH/j1kCMlBjMChdpPUzzlHbYuP
+1f5S7bjXHStqM8FbsfJTu3xxwnd8N2gHgUKmsCFuBz08UrWVHqpe1lr8/MIIrW+
dWUUg0zuk4bFPlVGL9dmTCc2aZWTX6V2GMT2hCsEmXGLHb/ifST+stC84ANOckSv
QfvTW0bIVCOa25GPqHZbLrSWovwT0fE4bVytlc6OPC5ep6qbGKdbBeysvSaTEQis
1i35zOd/0DUslt1vqEUiBZSrN7FKMo3rM3hvQvBlurHAgI8GeohnjaJ6av2sRwmB
U1dIaMmpVLDlHwPuSmRdBNKn/w2tTskmWVmC9M9084B8BIoXKXHGrKGBQqGtPkE=
=nnq+
-----END PGP SIGNATURE-----