Clion casting error?

Yo,

I`m having the usual amateur hour problems!

Clion seems to suggest there is a parameter mismatch but there should not be one.. GCC is not complaining anything when I run this. Is this buggy behaviour or is it clear to you masters what I`m doing wrong? Should I just ignore the warning? : )
Clion wants suggest to cast it like this:

faceIndex.reset((std::vector<openvdb::Vec3s> *) new std::vector<uint32_t>(*FI));

But then it won`t compile and I get the following:
error: no matching function for call to ‘std::unique_ptr<std::vector<unsigned int> >::reset(std::vector<openvdb::v3_0::math::Vec3<float> >*)’
     faceIndex.reset((std::vector<openvdb::Vec3s> *) new std::vector<uint32_t>(*FI));

All tips appreciated! I`m a beginner! : )


Thanks,
- J

5 comments
Comment actions Permalink

I suppose I will suppress the error for now?.. It is kinda annoying, tho because it happens relatively often, but GCC is happy so I think I can keep going forward...

0
Comment actions Permalink

Hi Juhani.

Sorry for the delay! Please try using the latest CLion 1.5 EAP which contains a lot of language improvements. Does that help?

0
Comment actions Permalink

Ahhh! Very cool! I will check it out when I get back to my workstation!
I didn`t know about EAP version.

I`we had no problems with this, tho. It`s just little bit annoying. : )

0
Comment actions Permalink

I`m happy to say that it helped! I have no idea what change in the 1.5 helped but it did!

Thanks Anna, 
- J

0
Comment actions Permalink

We are glad to help! CLion 1.5 EAP contains variadic templates support and also other improvements.

0

Please sign in to leave a comment.