Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7053 closed Bugs (fixed)

lexical_cast and gtest

Reported by: anonymous Owned by: John Maddock
Milestone: Boost 1.52.0 Component: math
Version: Boost 1.50.0 Severity: Showstopper
Keywords: Cc: antoshkka@…

Description

Hello.

VS 2005 SP1
googletest compiled with 'GTEST_USE_OWN_TR1_TUPLE=0'
I use Boost 1.48 - ok
If i switch to 1.50:

#include "stdafx.h"

#include <gtest/gtest.h>
#include <boost/lexical_cast.hpp>

int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}

error C2146: syntax error : missing ';' before identifier 'BOOST_NO_MACRO_EXPAND'
error C2433: 'fpclassify_imp' : 'inline' not permitted on data declarations
error C2065: 'T' : undeclared identifier
error C2146: syntax error : missing ')' before identifier 't'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2059: syntax error : ')'

Attachments (1)

lexical_case_failure.zip (1.5 KB) - added by anonymous 5 years ago.
simple VS 2005 project exposing same issue without gtest

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by anonymous

Attachment: lexical_case_failure.zip added

simple VS 2005 project exposing same issue without gtest

comment:1 Changed 5 years ago by Antony Polukhin

Cc: antoshkka@… added
Component: lexical_castmath
Milestone: To Be DeterminedBoost 1.51.0
Owner: changed from Antony Polukhin to John Maddock
Severity: ProblemShowstopper

Build failure is caused by adding boost/tr1/tr1 to compiler's include search path.
Reproduced it on gcc:

In file included from ../../trunk/boost/math/complex/details.hpp:20:0,
                 from ../../trunk/boost/math/complex/asin.hpp:9,
                 from ../../trunk/boost/math/complex.hpp:10,
                 from ../../trunk/boost/tr1/complex.hpp:13,
                 from ../../trunk/boost/tr1/tr1/complex:28,
                 from ../../trunk/boost/math/special_functions/math_fwd.hpp:31,
                 from ../../trunk/boost/math/special_functions/sign.hpp:17,
                 from ../../trunk/boost/lexical_cast.hpp:153,
                 from ../../trunk/libs/conversion/test/lexical_cast_arrays_test.cpp:11:
../../trunk/boost/math/special_functions/fpclassify.hpp:123:27: error: expected initializer before 'BOOST_NO_MACRO_EXPAND'

Looks more like a boost::math or boost::tr1 library bug

comment:2 Changed 5 years ago by John Maddock

Resolution: fixed
Status: newclosed

(In [79420]) Fix double inclusion of <complex> which causes use of Boost.TR1 to fail. Fixes #7053.

comment:3 Changed 5 years ago by John Maddock

Milestone: Boost 1.51.0Boost 1.52.0

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.