From a7f7cfe4f9169ee1610aa3d11a5d1dcb98aa4b11 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 26 Sep 2016 10:11:29 -0400 Subject: [PATCH] Update brigand.hpp to get corrections for MSVC2013. --- vtkm/internal/brigand.hpp | 139 ++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 66 deletions(-) diff --git a/vtkm/internal/brigand.hpp b/vtkm/internal/brigand.hpp index ea955372e..0563fe052 100644 --- a/vtkm/internal/brigand.hpp +++ b/vtkm/internal/brigand.hpp @@ -439,76 +439,83 @@ namespace brigand { namespace detail { - constexpr std::size_t count_bools(bool const * const begin, bool const * const end, - std::size_t n) - { - return begin == end ? n : detail::count_bools(begin + 1, end, n + *begin); - } - template - struct template_count_bools - { - using type = ::brigand::size_t<0>; - }; - template - struct template_count_bools - { - using type = ::brigand::size_t::type::value>; - }; - template - struct template_count_bools - { - using type = - ::brigand::size_t::type::value>; - }; +#if defined(BRIGAND_COMP_GCC) || defined(BRIGAND_COMP_CLANG) //not MSVC + constexpr std::size_t count_bools(bool const * const begin, bool const * const end,std::size_t n) + { + return begin == end ? n : detail::count_bools(begin + 1, end, n + *begin); + } +#endif + template + struct template_count_bools + { + using type = ::brigand::size_t<0>; + }; + template + struct template_count_bools + { + using tail_t = typename template_count_bools::type; + using type = ::brigand::size_t; + }; + template + struct template_count_bools + { + using tail_t = typename template_count_bools::type; + using type = ::brigand::size_t < B1 + B2 + B3 + B4 + B5 + B6 + B7 + B8 + + B9 + B10 + B11 + B12 + B13 + B14 + B15 + B16 + + tail_t::value + >; + }; } + namespace lazy { - template - struct count_if - { - }; - template