Skip to content
This repository was 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
pauloscustodio wants to merge 1 commit into
Qix-:masterfrom
pauloscustodio:master
Open

define NOMINMAX so that std::min and std::max may be used#11
pauloscustodio wants to merge 1 commit into
Qix-:masterfrom
pauloscustodio:master

Conversation

@pauloscustodio

Copy link
Copy Markdown

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

@Qix-

Qix- commented Apr 9, 2019

Copy link
Copy Markdown
Owner

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

pauloscustodio commented Apr 9, 2019

Copy link
Copy Markdown
Author

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