File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -51,32 +51,28 @@ namespace boost {
5151 //
5252 // some helper functions which really should be constexpr already, but sadly aren't:
5353 //
54- #ifndef BOOST_NO_CXX14_CONSTEXPR
5554 template <class T >
56- inline constexpr T constexpr_min (T const & a, T const & b) BOOST_GCD_NOEXCEPT(T)
55+ inline BOOST_CONSTEXPR T constexpr_min (T const & a, T const & b) BOOST_GCD_NOEXCEPT(T)
5756 {
5857 return a < b ? a : b;
5958 }
59+
60+ #ifndef BOOST_NO_CXX14_CONSTEXPR
6061 template <class T >
61- inline constexpr auto constexpr_swap (T&a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
62+ inline constexpr auto constexpr_swap (T& a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
6263 {
6364 return a.swap (b);
6465 }
6566 template <class T , class U >
66- inline constexpr void constexpr_swap (T&a, U& b...) BOOST_GCD_NOEXCEPT(T)
67+ inline constexpr void constexpr_swap (T& a, U& b...) BOOST_GCD_NOEXCEPT(T)
6768 {
6869 T t (static_cast <T&&>(a));
6970 a = static_cast <T&&>(b);
7071 b = static_cast <T&&>(t);
7172 }
7273#else
7374 template <class T >
74- inline T constexpr_min (T const & a, T const & b) BOOST_GCD_NOEXCEPT(T)
75- {
76- return a < b ? a : b;
77- }
78- template <class T >
79- inline void constexpr_swap (T&a, T& b) BOOST_GCD_NOEXCEPT(T)
75+ inline void constexpr_swap (T& a, T& b) BOOST_GCD_NOEXCEPT(T)
8076 {
8177 using std::swap;
8278 swap (a, b);
You can’t perform that action at this time.
0 commit comments