stlab.adobe.com Adobe Systems Incorporated
check_null.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3  Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4  or a copy at http://stlab.adobe.com/licenses.html)
5 */
6 
7 /*************************************************************************************************/
8 
9 #include <adobe/config.hpp>
10 #include <boost/test/unit_test.hpp>
11 
12 namespace adobe {
18 template <typename T>
19 void check_null(const T& x)
20 {
21  T t = T();
22  if(t)
23  BOOST_ERROR("operator bool");
24  BOOST_CHECK_MESSAGE(!t, "operator!");
25 
26  BOOST_CHECK_MESSAGE(x, "operator!");
27  if(!x)
28  BOOST_ERROR("operator bool");
29 
30 }
32 }
33 

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google