Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delegating constructor with move semantics and std::forward
- Loading branch information
1 parent
eca2838
commit 8bd6333
Showing
4 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef IV_FORWARD_H_ | ||
#define IV_FORWARD_H_ | ||
#include <utility> | ||
|
||
#define IV_FORWARD_CONSTRUCTOR(Derived, Base) \ | ||
template<class... Args> \ | ||
Derived(Args&&... args) \ | ||
: Base(std::forward<Args>(args)...) { } | ||
|
||
#endif // IV_FORWARD_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters