/* @copyright Louis Dionne 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #include #include #include using namespace boost::hana; template struct F; //! @todo //! If metafunctions need to look like that to be used with `bind`, //! it's pretty useless. //! //! @bug //! We need to use `std::remove_const_t` because `decltype(type<...>)` is //! `const operators::_type<...>`, and when we nest `decltype_`s it creates //! `operators::_type>` instead of the expected //! `operators::_type>`. This causes problems such as //! failing to match the `join` implementation in our case. What's the way //! to fix this? template using G = std::remove_const_t>)>; struct X { }; int main() { BOOST_HANA_STATIC_ASSERT(join(decltype_(decltype_(X{}))) == decltype_(X{})); BOOST_HANA_STATIC_ASSERT(join(decltype_(decltype_(decltype_(X{})))) == decltype_(decltype_(X{}))); BOOST_HANA_STATIC_ASSERT(bind(type, template_) == type>); }