Add more checked_delete tests, a visit_each test.

This commit is contained in:
Peter Dimov
2014-06-03 21:02:36 +03:00
parent d30b4b2ec3
commit 7ebcee675a
5 changed files with 154 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
// Boost checked_delete test program ---------------------------------------//
// Copyright Beman Dawes 2001. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/utility for documentation.
// Revision History
// 21 May 01 Initial version (Beman Dawes)
#include <boost/checked_delete.hpp> // for checked_delete
// This program demonstrates compiler errors when trying to delete an
// incomplete type.
namespace
{
class Incomplete;
}
int main()
{
Incomplete * p = 0;
boost::checked_array_delete(p); // should cause compile time error
return 0;
} // main