From 591fd1687d2fceee88bbe1fe49ddacb8d1639a68 Mon Sep 17 00:00:00 2001 From: Tristan Brindle Date: Thu, 24 Jan 2019 15:06:48 +0000 Subject: [PATCH] Only use libstdc++'s constexpr maths functions with GCC Clang's __builtin_sqrt() etc aren't constexpr Fixes #7 --- raytracer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raytracer.hpp b/raytracer.hpp index 3008e44..93aa5d1 100644 --- a/raytracer.hpp +++ b/raytracer.hpp @@ -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