> -----Original Message-----
> From: John Peterson [mailto:[email protected]]
> 
> #2a - I agree that macros are evil, but this one is pretty benign:
> 
> #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
>   TypeName(const TypeName&);               \
>   void operator=(const TypeName&);


Just a curious lurker here.  What about a non-macro solution:

http://www.boost.org/doc/libs/1_43_0/boost/noncopyable.hpp

Chetan


> And you place it into the private section of a class via:
> 
> class D
> {
> public:
>   D() { }
>   D(int) { }
> 
> private:
>   // Macro explicitly prevents copy and assignment by declaring
>   // them private.  (Note, you must put the private section in
>   // yourself, it's not part of the macro!)
>   DISALLOW_COPY_AND_ASSIGN(D);
> };
> 
> --
> John



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to