/Src/Dependencies/Boost/boost/fusion/algorithm/transformation/filter_if.hpp

http://hadesmem.googlecode.com/ · C++ Header · 32 lines · 21 code · 5 blank · 6 comment · 0 complexity · 584346398a8007fa6c18a6683a51d9d8 MD5 · raw file

  1. /*=============================================================================
  2. Copyright (c) 2001-2006 Joel de Guzman
  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. ==============================================================================*/
  6. #if !defined(FUSION_FILTER_IF_07172005_0818)
  7. #define FUSION_FILTER_IF_07172005_0818
  8. #include <boost/fusion/view/filter_view/filter_view.hpp>
  9. namespace boost { namespace fusion
  10. {
  11. namespace result_of
  12. {
  13. template <typename Sequence, typename Pred>
  14. struct filter_if
  15. {
  16. typedef filter_view<Sequence, Pred> type;
  17. };
  18. }
  19. template <typename Pred, typename Sequence>
  20. inline typename result_of::filter_if<Sequence const, Pred>::type
  21. filter_if(Sequence const& seq)
  22. {
  23. return filter_view<Sequence const, Pred>(seq);
  24. }
  25. }}
  26. #endif