[bind10-dev] noncopyable classes

Jelte Jansen jelte at isc.org
Mon Feb 14 09:37:57 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

we have certain classes that we want to be noncopyable, and so far I've seen two
different ways to do this;

1. make it a subclass of boost::noncopyable
2. make the copy constructor and the assignment operators private

The first is slightly shorter, but the second is not that much more work, and it
has the slight advantage that it at least gets rid of one dependency on boost in
our headers.

And of course for the sake of consistency it's better to only use one method
here, so I'd like to propose we update the coding guidelines to use method 2 for
this.

Any thoughts?

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1Y9/UACgkQ4nZCKsdOncX0IQCgkNHC4KnOQ8xNEKuWi8DSDTR8
hLQAnjOXF4ecClPhJ5Xp44m6a7aeYvEv
=HqSS
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list