This commit is contained in:
Hans Dembinski 2019-01-20 22:56:38 +01:00
parent 2ea4051e62
commit 6bc32d0ea6

View File

@ -139,8 +139,8 @@ public:
metadata_type& metadata() {
return visit(
[](auto& a) -> metadata_type& {
using M = std::remove_reference_t<decltype(traits::metadata(a))>;
return detail::static_if<std::is_same<M, metadata_type>>(
using M = decltype(traits::metadata(a));
return detail::static_if<std::is_same<M, metadata_type&>>(
[](auto& a) -> metadata_type& { return traits::metadata(a); },
[](auto&) -> metadata_type& {
BOOST_THROW_EXCEPTION(std::runtime_error(detail::cat(