2
0
mirror of https://github.com/boostorg/hof.git synced 2026-02-01 08:32:12 +00:00

Add a check for default construction

This commit is contained in:
Paul
2015-08-28 15:01:58 -05:00
parent ee2d5564b9
commit b223216433

View File

@@ -44,12 +44,14 @@ struct reveal_static_const_factory
template<class F>
constexpr reveal_adaptor<F> operator=(const F& f) const
{
static_assert(is_default_constructible<F>::value, "Static functions must be default constructible");
return reveal_adaptor<F>(f);
}
#else
template<class F>
constexpr const reveal_adaptor<F>& operator=(const F&) const
{
static_assert(is_default_constructible<F>::value, "Static functions must be default constructible");
return static_const_var<reveal_adaptor<F>>();
}
#endif