/////////////////////////////////////////////////////////////////////////////// // bug2407.hpp // // Copyright 2008 Eric Niebler. 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 namespace mpl = boost::mpl; namespace proto = boost::proto; using proto::_; template struct e; struct g : proto::or_< proto::terminal , proto::plus > {}; struct d : proto::domain, g> {}; template struct e : proto::extends, d> { BOOST_MPL_ASSERT((proto::matches)); e(E const &x = E()) : proto::extends, d>(x) {} }; e::type> i; template std::ostream &operator<<(std::ostream &sout, e const &x) { return sout; } int main() { std::cout << (i+i); }