Skip to content
This repository has been archived by the owner on May 11, 2019. It is now read-only.

define NOMINMAX so that std::min and std::max may be used #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pauloscustodio
Copy link

Without this define, sources using std::min and std::max and including filesystem.hpp in Windows do not compile.

@Qix-
Copy link
Owner

Qix- commented Apr 9, 2019

I don't feel comfortable defining this, as users may not want this. Why not define it yourself in your own code prior to including filesystem? This will break a lot of people.

@pauloscustodio
Copy link
Author

pauloscustodio commented Apr 9, 2019

This is what I have done.

Maybe add a note in the README? The compilation error is a bit obscure; I got :

buffer.cpp(36): error C2589: '(': illegal token on right side of '::'
buffer.cpp(36): error C2144: syntax error: 'unknown-type' should be preceded by ')'
buffer.cpp(36): error C2660: 'Buffer::append_bytes': function does not take 0 arguments

where the offending line reads:

			append_bytes(std::max(aaa, bbb));

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

Successfully merging this pull request may close these issues.

2 participants