Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy - C++11 vs C++14 #6

Open
jxmot opened this issue Aug 17, 2021 · 1 comment
Open

Discrepancy - C++11 vs C++14 #6

jxmot opened this issue Aug 17, 2021 · 1 comment

Comments

@jxmot
Copy link

jxmot commented Aug 17, 2021

The documentation states that it's dependent on the standard-library for C++11. However, the examples are relying on C++14.

Adding the following to your source(or a header) will make the examples work without modifying them -

#if __cplusplus < 201402L
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
#endif
@jgaa
Copy link
Owner

jgaa commented Oct 4, 2021

Thanks. I missed this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants