Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Make actor self reference optional - again #9724

Merged
merged 1 commit into from
Aug 8, 2017

Conversation

ivovandongen
Copy link
Contributor

In #9591 we added a way to construct Actors from arbitrary objects (without requiring modifying the constructor(s)). This broke on Apple clang < 8.2 which is needed for Qt and got reversed in #9720.

This PR re-introduces the same construct with a slightly different syntax on the templates which works with older apple clang versions as well.

- uses a different method of constructor selection that also works on Apple clang < 8.2.
@ivovandongen ivovandongen added the Core The cross-platform C++ core, aka mbgl label Aug 8, 2017
@ivovandongen ivovandongen self-assigned this Aug 8, 2017
@ivovandongen
Copy link
Contributor Author

@tmpsantos Re-enabling this as I need it for #9576 (using the renderer as an Actor).

Apparently using:

typename std::enable_if<!std::is_constructible<U, ActorRef<Object>, Args...>::value>::type * = nullptr

instead of

typename std::enable_if<!std::is_constructible<U, ActorRef<Object>, Args...>::value>::type...

works on older apple clang versions. Tested with Xcode 8.2 (Apple LLVM version 8.0.0 (clang-800.0.42.1))

Copy link
Contributor

@tmpsantos tmpsantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

@ivovandongen ivovandongen merged commit 68f470f into master Aug 8, 2017
@ivovandongen ivovandongen deleted the ivd-actor-no-selfref branch August 8, 2017 08:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants