diff --git a/sprout/darkroom/objects/polygon/triangle.hpp b/sprout/darkroom/objects/polygon/triangle.hpp index 66971fab..70b8d4e4 100644 --- a/sprout/darkroom/objects/polygon/triangle.hpp +++ b/sprout/darkroom/objects/polygon/triangle.hpp @@ -46,7 +46,7 @@ namespace sprout { private: template SPROUT_CONSTEXPR bool - within_test(Vector const& d0, Vector const& d1) { + within_test(Vector const& d0, Vector const& d1) const { return sprout::darkroom::coords::dot( sprout::darkroom::coords::cross(d0, d1), normal_ diff --git a/sprout/range/adaptor/offset.hpp b/sprout/range/adaptor/offset.hpp index 19ec1da1..0d4edeac 100644 --- a/sprout/range/adaptor/offset.hpp +++ b/sprout/range/adaptor/offset.hpp @@ -57,12 +57,12 @@ namespace sprout { public: template SPROUT_CONSTEXPR sprout::adaptors::offset_holder - operator()(Difference1 from_begin, Difference2 from_end) { + operator()(Difference1 from_begin, Difference2 from_end) const { return sprout::adaptors::offset_holder(from_begin, from_end); } template SPROUT_CONSTEXPR sprout::adaptors::offset_holder - operator()(Difference from_begin) { + operator()(Difference from_begin) const { return sprout::adaptors::offset_holder(from_begin); } }; diff --git a/sprout/variant/as_variant_visitor.hpp b/sprout/variant/as_variant_visitor.hpp index 5aa6da0a..45e97b01 100644 --- a/sprout/variant/as_variant_visitor.hpp +++ b/sprout/variant/as_variant_visitor.hpp @@ -28,8 +28,8 @@ namespace sprout { : v_(v) {} template - SPROUT_CONSTEXPR auto operator()(T&& t) - -> decltype(std::declval().get()(sprout::forward(t))) const + SPROUT_CONSTEXPR auto operator()(T&& t) const + -> decltype(std::declval().get()(sprout::forward(t))) { return v_.get()(sprout::forward(t)); } diff --git a/sprout/variant/as_visitor.hpp b/sprout/variant/as_visitor.hpp index 9577714a..76236d32 100644 --- a/sprout/variant/as_visitor.hpp +++ b/sprout/variant/as_visitor.hpp @@ -54,8 +54,8 @@ namespace sprout { : v_(v) {} template - SPROUT_CONSTEXPR auto operator()(T&& t) - -> decltype(std::declval().get()(sprout::forward(t))) const + SPROUT_CONSTEXPR auto operator()(T&& t) const + -> decltype(std::declval().get()(sprout::forward(t))) { return v_.get()(sprout::forward(t)); } diff --git a/sprout/workaround/recursive_function_template.hpp b/sprout/workaround/recursive_function_template.hpp index ea7a54ed..43e51eab 100644 --- a/sprout/workaround/recursive_function_template.hpp +++ b/sprout/workaround/recursive_function_template.hpp @@ -12,7 +12,15 @@ // SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT // #ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT -# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 +# if defined(__clang__) +# if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_major__ <= 2)) +# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 +# else +# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 256 +# endif +# else +# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 +# endif #endif //