// Copyright (C) 2016-2018 T. Zachary Laine // // 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 template using term = boost::yap::terminal; template using place_term = boost::yap::terminal>; template using ref = boost::yap::expression_ref; namespace yap = boost::yap; namespace bh = boost::hana; void compile_placeholders() { using namespace boost::yap::literals; { place_term<1> p1 = 1_p; (void)p1; } { place_term<1> p1 = 1_p; term unity{1.0}; yap::expression< yap::expr_kind::plus, bh::tuple &>, ref &>>> expr = p1 + unity; (void)expr; } { place_term<1> p1 = 1_p; yap::expression< yap::expr_kind::plus, bh::tuple &>, place_term<2>>> expr = p1 + 2_p; (void)expr; } }