workaround for clang3.4 or later: empty base class construction

This commit is contained in:
bolero-MURAKAMI 2014-03-03 12:01:27 +09:00
parent 3cdebc72b8
commit 3d170e65a4

View file

@ -11,6 +11,7 @@
#include <type_traits> #include <type_traits>
#include <sprout/config.hpp> #include <sprout/config.hpp>
#include <sprout/functional/type_traits/inherit_if_type.hpp> #include <sprout/functional/type_traits/inherit_if_type.hpp>
#include <sprout/workaround/base_class_construct.hpp>
namespace sprout { namespace sprout {
namespace detail { namespace detail {
@ -78,7 +79,14 @@ namespace sprout {
template<typename F> template<typename F>
struct weak_result_type struct weak_result_type
: public sprout::detail::weak_result_type_impl<typename std::remove_cv<F>::type> : public sprout::detail::weak_result_type_impl<typename std::remove_cv<F>::type>
{}; {
#ifdef SPROUT_WORKAROUND_NEEDS_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT
public:
SPROUT_CONSTEXPR weak_result_type()
: SPROUT_EXPLICIT_EMPTY_BASE_CLASS_CONSTRUCT(sprout::detail::weak_result_type_impl<typename std::remove_cv<F>::type>)
{}
#endif
};
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_WEAK_RESULT_TYPE_HPP #endif // #ifndef SPROUT_FUNCTIONAL_TYPE_TRAITS_WEAK_RESULT_TYPE_HPP