• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  Copyright (c) 2017 Andrey Semashev
2 //
3 //  Distributed under the Boost Software License, Version 1.0.
4 //  See accompanying file LICENSE_1_0.txt or copy at
5 //  http://www.boost.org/LICENSE_1_0.txt)
6 
7 #include <boost/atomic.hpp>
8 
9 struct foo
10 {
11     int n;
12 };
13 
main(int,char * [])14 int main(int, char *[])
15 {
16     // The test verifies that atomic<> does not provide arithmetic operations on member pointers
17     typedef int (foo::*mem_ptr);
18     boost::atomic< mem_ptr > a;
19     a.fetch_add(1);
20 
21     return 1;
22 }
23