Skip to content
Permalink
Browse files

added BOOST_NO_DECLTYPE and BOOST_RESULT_OF_USE_TR1 flags to makefile…

… with tests to make Boost 1.52.0 behave like earlier versions and not use C++11 decltype
  • Loading branch information...
bob-carpenter committed Dec 6, 2012
1 parent 3aef1c5 commit d109ff191ddbc26ebeadecbc998156071c86e80c
Showing with 17 additions and 1 deletion.
  1. +1 −1 makefile
  2. +16 −0 src/test/math/special_functions_test.cpp
@@ -31,7 +31,7 @@ GTEST ?= lib/gtest_1.6.0
##
# Set default compiler options.
##
CFLAGS = -I src -I $(EIGEN) -I $(BOOST) -O$O -Wall
CFLAGS = -I src -I $(EIGEN) -I $(BOOST) -O$O -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE
LDLIBS = -Lbin -lstan
LDLIBS_STANC = -Lbin -lstanc
EXE =
@@ -447,3 +447,19 @@ TEST(MathSpecialFunctions,asBool) {
EXPECT_FALSE(as_bool(0.0));
EXPECT_FALSE(as_bool(0.0f));
}
TEST(MathSpecialFunctions,BoostUseTr1Def) {
bool BOOST_RESULT_OF_USE_TR1_is_defined = false;

#ifdef BOOST_RESULT_OF_USE_TR1
BOOST_RESULT_OF_USE_TR1_is_defined = true;
#endif

EXPECT_TRUE(BOOST_RESULT_OF_USE_TR1_is_defined);
}
TEST(MathSpecialFunctions,BoostNoDeclTypeDef) {
bool BOOST_NO_DECLTYPE_is_defined = false;
#ifdef BOOST_NO_DECLTYPE
BOOST_NO_DECLTYPE_is_defined = true;
#endif
EXPECT_TRUE(BOOST_NO_DECLTYPE_is_defined);
}

0 comments on commit d109ff1

Please sign in to comment.
You can’t perform that action at this time.