Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/bind/test/bind_dm3_test.cpp @ 45

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

updated boost from 1_33_1 to 1_34_1

File size: 1.1 KB
Line 
1#include <boost/config.hpp>
2
3#if defined(BOOST_MSVC)
4#pragma warning(disable: 4786)  // identifier truncated in debug info
5#pragma warning(disable: 4710)  // function not inlined
6#pragma warning(disable: 4711)  // function selected for automatic inline expansion
7#pragma warning(disable: 4514)  // unreferenced inline removed
8#endif
9
10//
11//  bind_dm3_test.cpp - data members (regression 1.31 - 1.32)
12//
13//  Copyright (c) 2005 Peter Dimov
14//
15// Distributed under the Boost Software License, Version 1.0. (See
16// accompanying file LICENSE_1_0.txt or copy at
17// http://www.boost.org/LICENSE_1_0.txt)
18//
19
20#include <boost/bind.hpp>
21
22#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
23#pragma warning(push, 3)
24#endif
25
26#include <iostream>
27
28#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
29#pragma warning(pop)
30#endif
31
32#include <boost/detail/lightweight_test.hpp>
33#include <utility>
34
35int main()
36{
37    typedef std::pair<int, int> pair_type;
38
39    pair_type pair( 10, 20 );
40
41    int const & x = boost::bind( &pair_type::first, _1 )( pair );
42
43    BOOST_TEST( &pair.first == &x );
44
45    return boost::report_errors();
46}
Note: See TracBrowser for help on using the repository browser.