search_fail2.cpp 725 B

12345678910111213141516171819202122232425
  1. /*
  2. Copyright (c) Marshall Clow 2010-2012.
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. For more information, see http://www.boost.org
  6. */
  7. #include <vector>
  8. #include <boost/cstdint.hpp>
  9. #include <boost/algorithm/searching/boyer_moore.hpp>
  10. int main( int , char* [] )
  11. {
  12. std::vector<boost::uint8_t> cv;
  13. std::vector<boost:: int8_t> iv;
  14. // Should fail to compile because the underlying types are different
  15. // They are the same size, but one is signed, and the other is not.
  16. (void) boost::algorithm::boyer_moore_search (
  17. cv.begin (), cv.end (), iv.begin (), iv.end ());
  18. return 0;
  19. }