Modify

Ticket #7053 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

lexical_cast and gtest

Reported by: anonymous Owned by: johnmaddock
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

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

Change History

Changed 3 years ago by anonymous

simple VS 2005 project exposing same issue without gtest

comment:1 Changed 3 years ago by apolukhin

  • Cc antoshkka@… added
  • Owner changed from apolukhin to johnmaddock
  • Component changed from lexical_cast to math
  • Severity changed from Problem to Showstopper
  • Milestone changed from To Be Determined to Boost 1.51.0

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 3 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:3 Changed 3 years ago by johnmaddock

  • Milestone changed from Boost 1.51.0 to Boost 1.52.0
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.