#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtx/string_cast.hpp>
#include <iostream>
int main() {
glm::vec3 a { 1.0, 2.0, 3.0 };
std::cout << glm::to_string(a) << std::endl;
return 0;
}
Compiles fine with g++ test.cpp -o test, but fails with g++ test.cpp -o test -DGLM_FORCE_INLINE=:
In file included from /usr/include/glm/gtx/string_cast.hpp:45,
from test.cpp:3:
/usr/include/glm/gtx/string_cast.inl: In function ‘std::string glm::detail::format(const char*, ...)’:
/usr/include/glm/gtx/string_cast.inl:21:40: error: function ‘std::string glm::detail::format(const char*, ...)’ can never be inlined because it uses variable argument lists
21 | GLM_FUNC_QUALIFIER std::string format(const char* message, ...) {
| ^~~~~~
Works fine with clang++ in both cases. Tested on glm 1.0.3.
Compiles fine with
g++ test.cpp -o test, but fails withg++ test.cpp -o test -DGLM_FORCE_INLINE=:Works fine with clang++ in both cases. Tested on glm 1.0.3.