/* * test_boost_test_decorator_enable_if -- Test case exposing * compilation problem with g++ (not clang++) against Boost trunk * svn rev. <=76217 (after 1.48.0 release) due to ambiguity between * template struct boost::enable_if and class * boost::unit_test::decorator::enable_if in * boost/typeof/native.hpp. * * Copyright (C) 2011 Torsten Maehne * * 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) */ /*! * \file test_boost_test_decorator_enable_if.cpp * * \brief Test case exposing compilation problem with g++ (not * clang++) against Boost trunk svn rev. <=76217 (after * 1.48.0 release) due to ambiguity between template struct boost::enable_if and class * boost::unit_test::decorator::enable_if in * boost/typeof/native.hpp. * * This test case compiles correctly against Boost 1.48.0 using Apple * g++ 4.2.1, MacPorts g++ 4.5.3 and 4.6.2 as well as Apple clang++ * 3.0 on Mac OS X Lion 10.7.2 and Xcode 4.2.1. * * It fails to compile against Boost trunk until at least svn * rev. 76217 using any of the mentioned g++ versions. Surprisingly, * clang++ 3.0 is still able to correctly compile the test case. * * This test case is derived from * test_signed_integer_output_with_karma.cpp in Trac ticket #6126 * . During the * discussion of ticket #6126 on the Boost-Spirit-general mailing * list, Jeroen Habraken identified the header * boost/test/tree/decorator.hpp as the origin for the compilation * failure of the test case agains Boost trunk. He found the cause to * be an ambiguity: * * boost/typeof/native.hpp:30:9: error: reference to 'enable_if' is ambiguous * boost/utility/enable_if.hpp:36:10: error: candidates are: * template struct boost::enable_if and * class boost::unit_test::decorator::enable_if * * As enable_if is often used without being fully qualified this * breaks in a major fashion. Since boost/test/tree/decorator.hpp seems * to be quite new (added 2011-10-02 11:00:16 +0200) it might be best * fixed there. * * For details, please cf. to: * * * \author Torsten Maehne * \date 2011-12-29 * \version $Id$ */ #define BOOST_TEST_MODULE test_boost_test_decorator_enable_if #include #include //! \test Dummy test. BOOST_AUTO_TEST_CASE(test_dummy) { // do nothing }