forked from boostorg/conversion
make boost::implicit_cast constexpr (fixes #25)
This commit is contained in:
1 parent
4e557d31d1
commit
9e3216d22f
2 files changed
+10
-1
No files matched your search
@@ -6,6 +6,11 @@
|
||||
#ifndef BOOST_IMPLICIT_CAST_DWA200356_HPP
|
||||
#define BOOST_IMPLICIT_CAST_DWA200356_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
@@ -23,7 +28,7 @@ template<class T> struct icast_identity
|
||||
// The use of identity creates a non-deduced form, so that the
|
||||
// explicit template argument must be supplied
|
||||
template <typename T>
|
||||
inline T implicit_cast (typename boost::detail::icast_identity<T>::type x) {
|
||||
BOOST_CONSTEXPR inline T implicit_cast (typename boost::detail::icast_identity<T>::type x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user