I suspect this may be the reason. Coliru gives this error:
clang++ -std=c++1y -O2 -Wall -pedantic -pthread main.cpp && ./a.out
/usr/local/include/boost/math/constants/constants.hpp:248:52: note: expanded from macro 'BOOST_DEFINE_MATH_CONSTANT'
namespace double_constants{ static const double name = x; } \
If it's defined as const and not constexpr, that may be why it's rejecting the code. To reassure ourselves that is the source of the issue, we can reproduce the error with this testcase:
// This code fails
#include <boost/math/constants/constants.hpp>
namespace double_constants{ static const double name = 25; }
static constexpr double SEC3 = static_cast<double>(45)/180*double_constants::name;
So how do we fix this? Don't use the non-templated version. Boost provides a templated version that we can use instead.
static constexpr double SEC3 = static_cast<double>(45)/180*boost::math::constants::pi<double>();
clang 3.5 also implements variable templates with C++1y mode:
template <class T>
static constexpr T SEC3 = static_cast<T>(45)/180*boost::math::constants::pi<T>();
int main()
{
std::cout << SEC3<double>;
}