Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#7479 closed Bugs (fixed)

Compiles fails with compilers supporting constexpr fails if the standard library doesn't provides the constexpr interface

Reported by: viboes Owned by: viboes
Milestone: Boost 1.52.0 Component: chrono
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

qcc.compile.c++ D:\boostBuild_QCC_1_52_0_beta1\boost\bin.v2\libs\chrono\build\qcc\release\link-static\target-os-qnxnto\threadapi-pthread\threading-multi\chrono.o
In file included from ./boost/chrono/chrono.hpp:11:0,
                 from ./boost/chrono/detail/inlined/chrono.hpp:13,
                 from libs\chrono\src\chrono.cpp:14:
./boost/chrono/duration.hpp: In static member function 'static constexpr float boost::chrono::detail::chrono_numeric_limits<float, true>::lowest()':
./boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()'
./boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()':
./boost/chrono/duration.hpp:363:57: error: call to non-constexpr function 'static std::numeric_limits<double>::_Ty std::numeric_limits<double>::max()'
./boost/chrono/duration.hpp: In static member function 'static constexpr long double boost::chrono::detail::chrono_numeric_limits<long double, true>::lowest()':
./boost/chrono/duration.hpp:371:61: error: call to non-constexpr function 'static std::numeric_limits<long double>::_Ty std::numeric_limits<long double>::max()'
cc: d:/qnxsdk/qnxsdk6.5-001/host/win32/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.7.1/cc1plus caught signal 1

    "QCC" -Wc,-ftemplate-depth-128 -DFD_SETSIZE=2048 -march=k8-sse3 -mtune=k8-sse3 -mmmx -msse3 -mfpmath=sse -mno-3dnow -mstackrealign -Wc,-fPIC,-std=c++0x,-std=gnu++0x -O3 -Wc,-finline-functions -Wc,-Wno-inline -Wc,-Wall -DBOOST_ALL_NO_LIB=1 -DBOOST_All_STATIC_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "D:\boostBuild_QCC_1_52_0_beta1\boost\bin.v2\libs\chrono\build\qcc\release\link-static\target-os-qnxnto\threadapi-pthread\threading-multi\chrono.o" "libs\chrono\src\chrono.cpp"

...failed qcc.compile.c++ D:\boostBuild_QCC_1_52_0_beta1\boost\bin.v2\libs\chrono\build\qcc\release\link-static\target-os-qnxnto\threadapi-pthread\threading-multi\chrono.o...
common.copy D:\boost\include\boost\checked_delete.hpp
D:\boost_1_52_0_beta1\boost\checked_delete.hpp
        1 file(s) copied.
common.copy D:\boost\include\boost\chrono.hpp
D:\boost_1_52_0_beta1\boost\chrono.hpp
        1 file(s) copied.
qcc.compile.c++ D:\boostBuild_QCC_1_52_0_beta1\boost\bin.v2\libs\chrono\build\qcc\release\link-static\target-os-qnxnto\threadapi-pthread\threading-multi\process_cpu_clocks.o
In file included from ./boost/chrono/process_cpu_clocks.hpp:18:0,
                 from ./boost/chrono/detail/inlined/process_cpu_clocks.hpp:19,
                 from libs\chrono\src\process_cpu_clocks.cpp:17:
./boost/chrono/duration.hpp: In static member function 'static constexpr float boost::chrono::detail::chrono_numeric_limits<float, true>::lowest()':
./boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()'
./boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()':
./boost/chrono/duration.hpp:363:57: error: call to non-constexpr function 'static std::numeric_limits<double>::_Ty std::numeric_limits<double>::max()'
./boost/chrono/duration.hpp: In static member function 'static constexpr long double boost::chrono::detail::chrono_numeric_limits<long double, true>::lowest()':
./boost/chrono/duration.hpp:371:61: error: call to non-constexpr function 'static std::numeric_limits<long double>::_Ty std::numeric_limits<long double>::max()'
cc: d:/qnxsdk/qnxsdk6.5-001/host/win32/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.7.1/cc1plus caught signal 1

Attachments (1)

7479.patch (6.7 KB ) - added by viboes 10 years ago.

Download all attachments as: .zip

Change History (5)

by viboes, 10 years ago

Attachment: 7479.patch added

comment:1 by viboes, 10 years ago

Status: newassigned

comment:2 by viboes, 10 years ago

Committed revision [80897].

comment:3 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.52.0
Resolution: fixed
Status: assignedclosed

Merged [80921]

comment:4 by anonymous, 9 years ago

It happens on my system. GNU 4.7.3, boost 1.55.

In file included from /other/boost/boost/chrono/time_point.hpp:33:0,

from /other/boost/boost/thread/lock_types.hpp:22, from /other/boost/boost/thread/pthread/recursive_mutex.hpp:13, from /other/boost/boost/thread/recursive_mutex.hpp:16, from /src/include/File1.hpp:14, from /src/include/File2.hpp:13, from /src/include/File3.hpp:12, from /src/cpp/File3.cpp:8:

/other/boost/boost/chrono/duration.hpp: In static member function 'static constexpr float boost::chrono::detail::chrono_numeric_limits<float, true>::lowest()': /other/boost/boost/chrono/duration.hpp:355:56: error: call to non-constexpr function 'static std::numeric_limits<float>::_Ty std::numeric_limits<float>::max()' /other/boost/boost/chrono/duration.hpp: In static member function 'static constexpr double boost::chrono::detail::chrono_numeric_limits<double, true>::lowest()': /other/boost/boost/chrono/duration.hpp:363:57: error: call to non-constexpr function 'static std::numeric_limits<double>::_Ty std::numeric_limits<double>::max()' /other/boost/boost/chrono/duration.hpp: In static member function 'static constexpr long double boost::chrono::detail::chrono_numeric_limits<long double, true>::lowest()': /other/boost/boost/chrono/duration.hpp:371:61: error: call to non-constexpr function 'static std::numeric_limits<long double>::_Ty std::numeric_limits<long double>::max()'

Note: See TracTickets for help on using tickets.