Skip to content

Commit

Permalink
Only use libstdc++'s constexpr maths functions with GCC
Browse files Browse the repository at this point in the history
Clang's __builtin_sqrt() etc aren't constexpr

Fixes #7
  • Loading branch information
tcbrindle committed Jan 24, 2019
1 parent 8d8f006 commit 591fd16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raytracer.hpp
Expand Up @@ -40,7 +40,7 @@ namespace cmath {

// libstdc++ provides some constexpr math functions as an extension, so
// use them if we can.
#ifdef __GLIBCXX__
#if defined(__GLIBCXX__) && !defined(__clang__)
#define HAVE_CONSTEXPR_STD_MATH
#endif

Expand Down

0 comments on commit 591fd16

Please sign in to comment.