is_sequence.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright Aleksey Gurtovoy 2002-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/mpl for documentation.
  8. // $Id$
  9. // $Date$
  10. // $Revision$
  11. #include <boost/mpl/is_sequence.hpp>
  12. #include <boost/mpl/int.hpp>
  13. #include <boost/mpl/list.hpp>
  14. #include <boost/mpl/vector.hpp>
  15. #include <boost/mpl/range_c.hpp>
  16. #include <boost/mpl/aux_/test.hpp>
  17. template< typename T > struct std_vector
  18. {
  19. T* begin();
  20. };
  21. MPL_TEST_CASE()
  22. {
  23. MPL_ASSERT_NOT(( is_sequence< std_vector<int> > ));
  24. MPL_ASSERT_NOT(( is_sequence< int_<0> > ));
  25. MPL_ASSERT_NOT(( is_sequence< int > ));
  26. MPL_ASSERT_NOT(( is_sequence< int& > ));
  27. MPL_ASSERT_NOT(( is_sequence< UDT > ));
  28. MPL_ASSERT_NOT(( is_sequence< UDT* > ));
  29. MPL_ASSERT(( is_sequence< range_c<int,0,0> > ));
  30. MPL_ASSERT(( is_sequence< list<> > ));
  31. MPL_ASSERT(( is_sequence< list<int> > ));
  32. MPL_ASSERT(( is_sequence< vector<> > ));
  33. MPL_ASSERT(( is_sequence< vector<int> > ));
  34. }