Only add conditional constexpr to get() for >= C++14 to work around errors on older compilers.
This commit is contained in:
parent
d7c0f157c5
commit
6eb37e9b78
@ -3063,7 +3063,10 @@ class basic_json
|
|||||||
@since version 2.1.0
|
@since version 2.1.0
|
||||||
*/
|
*/
|
||||||
template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>
|
template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>
|
||||||
constexpr auto get() const noexcept(
|
#if defined(JSON_HAS_CPP_14)
|
||||||
|
constexpr
|
||||||
|
#endif
|
||||||
|
auto get() const noexcept(
|
||||||
noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))
|
noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))
|
||||||
-> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
|
-> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
|
||||||
{
|
{
|
||||||
|
@ -19815,7 +19815,10 @@ class basic_json
|
|||||||
@since version 2.1.0
|
@since version 2.1.0
|
||||||
*/
|
*/
|
||||||
template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>
|
template < typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>>
|
||||||
constexpr auto get() const noexcept(
|
#if defined(JSON_HAS_CPP_14)
|
||||||
|
constexpr
|
||||||
|
#endif
|
||||||
|
auto get() const noexcept(
|
||||||
noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))
|
noexcept(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {})))
|
||||||
-> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
|
-> decltype(std::declval<const basic_json_t&>().template get_impl<ValueType>(detail::priority_tag<4> {}))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user