fix: support for clang3.3

This commit is contained in:
bolero-MURAKAMI 2013-06-17 23:44:18 +09:00
parent c8d3fbe597
commit 4182fb3fea
5 changed files with 16 additions and 8 deletions

View file

@ -46,7 +46,7 @@ namespace sprout {
private: private:
template<typename Vector> template<typename Vector>
SPROUT_CONSTEXPR bool 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( return sprout::darkroom::coords::dot(
sprout::darkroom::coords::cross(d0, d1), sprout::darkroom::coords::cross(d0, d1),
normal_ normal_

View file

@ -57,12 +57,12 @@ namespace sprout {
public: public:
template<typename Difference1, typename Difference2> template<typename Difference1, typename Difference2>
SPROUT_CONSTEXPR sprout::adaptors::offset_holder<Difference1, Difference2> SPROUT_CONSTEXPR sprout::adaptors::offset_holder<Difference1, Difference2>
operator()(Difference1 from_begin, Difference2 from_end) { operator()(Difference1 from_begin, Difference2 from_end) const {
return sprout::adaptors::offset_holder<Difference1, Difference2>(from_begin, from_end); return sprout::adaptors::offset_holder<Difference1, Difference2>(from_begin, from_end);
} }
template<typename Difference> template<typename Difference>
SPROUT_CONSTEXPR sprout::adaptors::offset_holder<Difference> SPROUT_CONSTEXPR sprout::adaptors::offset_holder<Difference>
operator()(Difference from_begin) { operator()(Difference from_begin) const {
return sprout::adaptors::offset_holder<Difference>(from_begin); return sprout::adaptors::offset_holder<Difference>(from_begin);
} }
}; };

View file

@ -28,8 +28,8 @@ namespace sprout {
: v_(v) : v_(v)
{} {}
template<typename T> template<typename T>
SPROUT_CONSTEXPR auto operator()(T&& t) SPROUT_CONSTEXPR auto operator()(T&& t) const
-> decltype(std::declval<holder_type const>().get()(sprout::forward<T>(t))) const -> decltype(std::declval<holder_type const>().get()(sprout::forward<T>(t)))
{ {
return v_.get()(sprout::forward<T>(t)); return v_.get()(sprout::forward<T>(t));
} }

View file

@ -54,8 +54,8 @@ namespace sprout {
: v_(v) : v_(v)
{} {}
template<typename T> template<typename T>
SPROUT_CONSTEXPR auto operator()(T&& t) SPROUT_CONSTEXPR auto operator()(T&& t) const
-> decltype(std::declval<holder_type const>().get()(sprout::forward<T>(t))) const -> decltype(std::declval<holder_type const>().get()(sprout::forward<T>(t)))
{ {
return v_.get()(sprout::forward<T>(t)); return v_.get()(sprout::forward<T>(t));
} }

View file

@ -12,7 +12,15 @@
// SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT // SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT
// //
#ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT #ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT
# if defined(__clang__)
# if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_major__ <= 2))
# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 # 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 #endif
// //