// Copyright Daniel Wallin 2006. // 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) #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) #include #else #include #endif // Borland workarounds needed. #include "deduced.hpp" namespace test { BOOST_PARAMETER_NAME(x) BOOST_PARAMETER_NAME(y) BOOST_PARAMETER_NAME(z) } // namespace test #include int main() { test::check< boost::parameter::parameters< test::tag::x , boost::parameter::optional< boost::parameter::deduced , boost::mpl::if_< boost::is_same< #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) boost::mpl::_1 , boost::remove_reference< boost::parameter::binding< boost::mpl::_2 , test::tag::x > > #else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) boost::add_lvalue_reference , boost::parameter::binding #endif // Borland workarounds needed. > , boost::mpl::true_ , boost::mpl::false_ > > > >((test::_x = 0, test::_y = 1), 0, 1); test::check< boost::parameter::parameters< test::tag::x , boost::parameter::optional< boost::parameter::deduced , boost::mpl::if_< boost::is_same< #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) boost::mpl::_1 , boost::remove_reference< boost::parameter::binding< boost::mpl::_2 , test::tag::x > > #else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) boost::add_lvalue_reference , boost::parameter::binding #endif // Borland workarounds needed. > , boost::mpl::true_ , boost::mpl::false_ > > > >((test::_x = 0U, test::_y = 1U), 0U, 1U); test::check< boost::parameter::parameters< test::tag::x , boost::parameter::optional< boost::parameter::deduced , boost::mpl::if_< boost::is_convertible , boost::mpl::true_ , boost::mpl::false_ > > > >((test::_x = 0U, test::_y = 1U), 0U, 1U); test::check< boost::parameter::parameters< test::tag::x , boost::parameter::optional< boost::parameter::deduced , boost::mpl::if_< boost::is_convertible , boost::mpl::true_ , boost::mpl::false_ > > > >((test::_x = 0U, test::_y = 1U), 0U, 1U); return boost::report_errors(); }