If you set C++11 policy for FB v4, you can use deleted constructors.
It's method 3 from your link.
(There were some discussions about C++11 <atomic>s in the ML.)

On 15 May 2016 at 00:59, Adriano dos Santos Fernandes
<adrian...@gmail.com> wrote:
> Hi!
>
> Instead of write private copy constructor and operator=, what about
> start using a mixing at least for new code?
>
> It makes easier and much more clear.
>
> Example taken from
> http://ariya.ofilabs.com/2015/01/c-class-and-preventing-object-copy.html
>
> class NonCopyable
> {
>   protected:
>     NonCopyable() {}
>     ~NonCopyable() {}
>
>   private:
>     NonCopyable(const NonCopyable &);
>     NonCopyable& operator=(const NonCopyable &);
> };
>
> class Car : private NonCopyable {
> public:
>   Car(): owner(0) {}
>   void setOwner(Person *o) { owner = o; }
>   Person *getOwner() const { return owner; }
> private:
>   Person *owner;
> };
>
>
> Adriano
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel



-- 
Egor Pugin

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to