Remove VS2015 workaround from Detail::generate

This commit is contained in:
Martin Hořeňovský 2023-01-18 15:01:42 +01:00
parent 956f915e31
commit 2d3c9713a3
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -207,10 +207,7 @@ namespace Detail {
auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; auto acquireGeneratorTracker( StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker&;
template<typename L> template<typename L>
// Note: The type after -> is weird, because VS2015 cannot parse auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> typename decltype(generatorExpression())::type {
// the expression used in the typedef inside, when it is in
// return type. Yeah.
auto generate( StringRef generatorName, SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval<decltype(generatorExpression())>().get()) {
using UnderlyingType = typename decltype(generatorExpression())::type; using UnderlyingType = typename decltype(generatorExpression())::type;
IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo ); IGeneratorTracker& tracker = acquireGeneratorTracker( generatorName, lineInfo );