1 /*============================================================================= 2 Copyright (c) 2017 Paul Fultz II 3 final_base.cpp 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #include <boost/hof/flip.hpp> 8 #include "test.hpp" 9 10 #if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7 11 #define FINAL 12 #else 13 #define FINAL final 14 #endif 15 16 17 struct f FINAL { operator ()FINAL18 int operator()(int i, void *) const { 19 return i; 20 } 21 }; 22 BOOST_HOF_TEST_CASE()23BOOST_HOF_TEST_CASE() 24 { 25 BOOST_HOF_TEST_CHECK(boost::hof::flip(f())(nullptr, 2) == 2); 26 } 27