Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/serialization/test/test_static_warning.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 942 bytes
Line 
1//  (C) Copyright Jonathan Turkanis 2004.
2//  Use, modification and distribution are subject to the
3//  Boost Software License, Version 1.0. (See accompanying file
4//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6//  See http://www.boost.org for most recent version including documentation.
7
8// note: this is a compile only test.
9
10#include <boost/test/test_tools.hpp>
11#include <boost/static_warning.hpp>
12
13#pragma warning(disable:4094)
14
15typedef char a1[2];
16typedef char a2[3];
17
18BOOST_STATIC_WARNING(true);
19BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn.
20BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn.
21
22void warnings() {
23    BOOST_STATIC_WARNING(true);
24    BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn.
25    BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn.
26}                               
27
28int test_main(int /* argc */, char * /* argv */[]){
29    warnings();
30    return EXIT_SUCCESS;
31}
Note: See TracBrowser for help on using the repository browser.