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

max() function not declared #3

Closed
tsoj opened this issue Jan 16, 2020 · 1 comment
Closed

max() function not declared #3

tsoj opened this issue Jan 16, 2020 · 1 comment

Comments

@tsoj
Copy link

tsoj commented Jan 16, 2020

if (extension != std::string::npos) version = max(extension, version);

On my Linux machine I get this error:

shader-printf/shader-printf/shaderprintf.h:219:48: error: ‘max’ was not declared in this scope
  219 |  if (extension != std::string::npos) version = max(extension, version);

A simple fix would be to use std::max() instead.

@msqrt
Copy link
Owner

msqrt commented Apr 13, 2020

Ah, right. The MSVC headers that are already included don't contain std::max, so I went for a ternary operator instead.

@msqrt msqrt closed this as completed Apr 13, 2020
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