[aspect-devel] lexical_cast warning
Timo Heister
heister at clemson.edu
Sat Apr 12 06:01:25 PDT 2014
Hi Wolfgang,
my gcc 4.8.1 doesn't like lexical cast from double:
In file included from ../source/termination_criteria/end_time.cc:24:0:
/scratch/deal-trunk/installed/include/deal.II/bundled/boost/lexical_cast.hpp:
In instantiation of ‘bool
boost::detail::lexical_stream_limited_src<CharT, Traits,
RequiresStringbuffer>::shl_double(double, T*) [with T = char; CharT =
char; Traits = std::char_traits<char>; bool RequiresStringbuffer =
false]’:
/scratch/deal-trunk/installed/include/deal.II/bundled/boost/lexical_cast.hpp:1421:86:
required from ‘bool boost::detail::lexical_stream_limited_src<CharT,
Traits, RequiresStringbuffer>::operator<<(double) [with CharT = char;
Traits = std::char_traits<char>; bool RequiresStringbuffer = false]’
/scratch/deal-trunk/installed/include/deal.II/bundled/boost/lexical_cast.hpp:1920:51:
required from ‘static Target
boost::detail::lexical_cast_do_cast<Target,
Source>::lexical_cast_impl(const Source&) [with Target =
std::basic_string<char>; Source = double]’
/scratch/deal-trunk/installed/include/deal.II/bundled/boost/lexical_cast.hpp:2087:50:
required from ‘Target boost::lexical_cast(const Source&) [with
Target = std::basic_string<char>; Source = double]’
../source/termination_criteria/end_time.cc:55:74: required from
‘static void aspect::TerminationCriteria::EndTime<dim>::declare_parameters(dealii::ParameterHandler&)
[with int dim = 2]’
../source/termination_criteria/end_time.cc:85:5: required from here
/scratch/deal-trunk/installed/include/deal.II/bundled/boost/lexical_cast.hpp:1297:124:
warning: ISO C++98 does not support the ‘%lg’ gnu_printf format
[-Wformat=]
finish = start + sprintf(out,"%.*lg",
static_cast<int>(boost::detail::lcast_get_precision<double >()), val
);
I am tempted to replace this by 1e300 again. Thoughts?
--
Timo Heister
http://www.math.clemson.edu/~heister/
More information about the Aspect-devel
mailing list