mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Remove VS2015 workaround from Detail::generate
This commit is contained in:
parent
956f915e31
commit
2d3c9713a3
@ -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 );
|
||||||
|
Loading…
Reference in New Issue
Block a user