//The following copied from: /* From: "Robert Ramey" Newsgroups: gmane.comp.lib.boost.user Subject: Re: challange to MPL gurus Date: Mon, 12 Dec 2011 20:49:37 -0800 */ #include #include #include #include #include #include #include #include #include namespace boost{namespace mpl{ template struct ForwardIterator { template struct is_end {}; template struct is_end { typedef typename deref::type t1; typedef typename next::type t2; BOOST_CONCEPT_ASSERT(( ForwardIterator )); }; typedef typename is_end< I, typename boost::is_same< boost::mpl::l_iter, I > > type; typedef typename boost::mpl::print< I >::type t1; BOOST_MPL_ASSERT(( is_convertible< typename I::category, forward_iterator_tag > )); }; }}