Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigned result of constexpr functions to constexpr variables #238

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/date_time/time_parsing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace date_time {
fs = _atoi64(beg->c_str());
}
#else
int precision = time_duration::num_fractional_digits();
BOOST_CXX14_CONSTEXPR int precision = time_duration::num_fractional_digits();
if(digits >= precision) {
// drop excess digits
fs = boost::lexical_cast<boost::int64_t>(beg->substr(0, precision));
Expand Down
5 changes: 2 additions & 3 deletions include/boost/date_time/time_system_counted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ namespace date_time {
}
static BOOST_CXX14_CONSTEXPR int_type frac_sec_per_day()
{
int_type seconds_per_day = 60*60*24;
int_type fractional_sec_per_sec(resolution_traits::res_adjust());
return seconds_per_day*fractional_sec_per_sec;
BOOST_CXX14_CONSTEXPR int_type seconds_per_day = 60*60*24;
return seconds_per_day*resolution_traits::res_adjust();
}
BOOST_CXX14_CONSTEXPR bool is_pos_infinity()const
{
Expand Down
Loading