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

Use explicitly deleted functions to make types non-copyable #111

Merged
merged 1 commit into from
Feb 14, 2015

Conversation

CarterLi
Copy link
Contributor

Note (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103L) means (FMT_GCC_VERSION >= 407 && __cplusplus >= 201103L) actually because of the gcc bug. CMake checks are suggested.
I'll create another PR after this gets merged. As for nullptr, I think it's acceptable as a monkey patch. Such things have been done by libc++.

vitaut added a commit that referenced this pull request Feb 14, 2015
Use explicitly deleted functions to make types non-copyable
@vitaut vitaut merged commit 0fc15d4 into fmtlib:master Feb 14, 2015
@vitaut
Copy link
Contributor

vitaut commented Feb 14, 2015

Thanks for another great PR. I wouldn't worry too much about older versions of GCC as it is covered b
by the fallback definition of FMT_DISALLOW_COPY_AND_ASSIGN:

# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \
    TypeName(const TypeName&); \
    TypeName& operator=(const TypeName&)

As for the monkey patch, if I understand correctly this would mean adding another required header to the library which I'd rather avoid.

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

Successfully merging this pull request may close these issues.

2 participants