atomic/test/Jamfile.v2
Andrey Semashev 406228d493 Made initializing constructor of atomic<> implicit.
This is an attempt to make boost::atomic<> interface closer to the standard. It
makes a difference in C++17 as it mandates copy elision, which makes this code
possible:

  boost::atomic<int> a = 10;

It also makes is_convertible<T, boost::atomic<T>> return true, which has
implications on the standard library components, such as std::pair.

This removes the workaround for gcc 4.7, which complains that
operator=(value_arg_type) is considered ambiguous with operator=(atomic const&)
in assignment expressions, even though conversion to atomic<> is less preferred
than conversion to value_arg_type. We try to work around the problem from the
operator= side.

Added a new compile test to check that the initializing constructor is implicit.
2018-02-20 01:39:52 +03:00

33 lines
955 B
Plaintext

# Boost.Atomic Library test Jamfile
#
# Copyright (c) 2011 Helge Bahmann
# Copyright (c) 2012 Tim Blechmann
#
# 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)
import testing ;
project boost/atomic/test
: requirements
<threading>multi
<library>/boost/thread//boost_thread
<library>/boost/atomic//boost_atomic
<target-os>windows:<define>BOOST_USE_WINDOWS_H
<target-os>windows:<define>_WIN32_WINNT=0x0500
<toolset>gcc,<target-os>windows:<linkflags>"-lkernel32"
;
test-suite atomic
: [ run native_api.cpp ]
[ run fallback_api.cpp ]
[ run atomicity.cpp ]
[ run ordering.cpp ]
[ run lockfree.cpp ]
[ compile-fail cf_arith_void_ptr.cpp ]
[ compile-fail cf_arith_func_ptr.cpp ]
[ compile-fail cf_arith_mem_ptr.cpp ]
[ compile c_implicit_ctor.cpp ]
;