1// (C) Copyright Oliver Kowalke 2016. 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/libs/config for most recent version. 7 8// MACRO: BOOST_NO_CXX14_STD_EXCHANGE 9// TITLE: apply 10// DESCRIPTION: The compiler supports the std::exchange() function. 11 12#include <utility> 13 14namespace boost_no_cxx14_std_exchange { 15 16int test() { 17 int * i = new int( 1); 18 int * j = std::exchange( i, nullptr); 19 delete j; 20 return 0; 21} 22 23} 24