From: Vladislav Lazarenko (snail_at_[hidden])
Date: 2006-04-07 11:01:58
Dear Boost community,
I thank you for such wonderful library, I can not even imagine
my life without Boost. Great work, team!
I propose to add the small but sometimes very useful class (like
boost::noncopyable) I developed it in hope it will be useful and included into
the best C++ framework in the world.
Note that I have tested this class only with:
1) Microsoft Visual C++ .NET 55537-640-4008961-18142
2) Microsoft Visual C++ .NET 69462-112-0617214-18401
But I think it won't be a problem to compile with gcc and so one.
And, surely, sorry if there is already such class in the Boost,
I did not found. If it is, please give me the link, I will take a look.
Please review and let me know what you think by replying to this message.
Thank you very much in advance.
// Copyright (c) 2006 Vladislav Lazarenko <snail_at_[hidden]>
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// MS compatible compilers support #pragma once.
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
// protection from unintended ADL
template <typename T1, typename T2>
friend typename T1;
friend typename T2;
The sealed classes is used to prevent derivation from a class.
An error occurs if a sealed class is specified as the base class of
A sealed class cannot also be an abstract class.
template <typename T>
class sealed : virtual private sealed_::sealed_impl<sealed, T>
// Usage example:
class UniquePerson : public boost::sealed<UniquePerson>
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk