unique.cpp 750 B

1234567891011121314151617181920212223242526272829
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. // Copyright David Abrahams 2003-2004
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // See http://www.boost.org/libs/mpl for documentation.
  9. // $Id$
  10. // $Date$
  11. // $Revision$
  12. #include <boost/mpl/unique.hpp>
  13. #include <boost/mpl/list.hpp>
  14. #include <boost/mpl/equal.hpp>
  15. #include <boost/type_traits/is_same.hpp>
  16. #include <boost/mpl/aux_/test.hpp>
  17. MPL_TEST_CASE()
  18. {
  19. typedef list<int,float,float,char,int,int,int,double> types;
  20. typedef unique< types, is_same<_1,_2> >::type result;
  21. typedef list<int,float,char,int,double>::type answer;
  22. MPL_ASSERT(( equal< result,answer > ));
  23. }