IrrlichtBAW | Build A World fork of Irrlicht | Media library
kandi X-RAY | IrrlichtBAW Summary
kandi X-RAY | IrrlichtBAW Summary
Build A World fork of Irrlicht
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of IrrlichtBAW
IrrlichtBAW Key Features
IrrlichtBAW Examples and Code Snippets
Community Discussions
Trending Discussions on IrrlichtBAW
QUESTION
We're trying to implement our own ref-counting smart pointer (something similar to std::shared_ptr
). We already have reference counted interface class from which other classes can inherit. The interface delivers grab()
and drop()
methods which are incrementing and decrementing ref count accordingly. Tldr manual ref counting. What we want to do now is RAII-like wrapper over this which calls grab()
while copying (copy ctor) and drop()
in destructor.
Here's source code to implementation of our smart pointer described in Intro section. Also necessary part of it is pasted below:
...ANSWER
Answered 2019-Aug-13 at 16:42Solution was making non-template copy constructor. User-defined copy constructor must be non-template constructor as C++14 standard states at 12.8.2 [class.copy]. Same thing needed to be done with move constructor, copy assignment operator and move assignment operator. So that copy constructor now looks like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install IrrlichtBAW
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page