diff --git a/dbms/include/DB/Core/FieldVisitors.h b/dbms/include/DB/Core/FieldVisitors.h index ad4f6070ba0..460f4f527db 100644 --- a/dbms/include/DB/Core/FieldVisitors.h +++ b/dbms/include/DB/Core/FieldVisitors.h @@ -28,7 +28,7 @@ struct StaticVisitor /// F is template parameter, to allow universal reference for field, that is useful for const and non-const values. template -typename Visitor::ResultType apply_visitor(Visitor && visitor, F && field) +typename std::decay::type::ResultType apply_visitor(Visitor && visitor, F && field) { switch (field.getType()) { @@ -47,7 +47,7 @@ typename Visitor::ResultType apply_visitor(Visitor && visitor, F && field) template -static typename Visitor::ResultType apply_binary_visitor_impl(Visitor && visitor, F1 && field1, F2 && field2) +static typename std::decay::type::ResultType apply_binary_visitor_impl(Visitor && visitor, F1 && field1, F2 && field2) { switch (field2.getType()) { @@ -65,7 +65,7 @@ static typename Visitor::ResultType apply_binary_visitor_impl(Visitor && visitor } template -typename Visitor::ResultType apply_visitor(Visitor && visitor, F1 && field1, F2 && field2) +typename std::decay::type::ResultType apply_visitor(Visitor && visitor, F1 && field1, F2 && field2) { switch (field1.getType()) {