search_fail1.cpp 659 B

123456789101112131415161718192021222324
  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/algorithm/searching/boyer_moore.hpp>
  9. int main( int , char* [] )
  10. {
  11. std::vector<char> cv;
  12. std::vector<int> iv;
  13. // Should fail to compile because the underlying types are different
  14. // They are (almost certainly) different sizes
  15. (void) boost::algorithm::boyer_moore_search (
  16. cv.begin (), cv.end (), iv.begin (), iv.end ());
  17. return 0;
  18. }