forked from boostorg/conversion
Attempt to fix access violation during forwarding of arrays on MSVC
This commit is contained in:
@@ -2096,7 +2096,8 @@ namespace boost {
|
|||||||
template <typename Target, typename Source>
|
template <typename Target, typename Source>
|
||||||
struct copy_converter_impl
|
struct copy_converter_impl
|
||||||
{
|
{
|
||||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
// MSVC fail to forward an array. This error is reported to MSVC's developer.
|
||||||
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MSVC)
|
||||||
template <class T>
|
template <class T>
|
||||||
static inline bool try_convert(T&& arg, Target& result) {
|
static inline bool try_convert(T&& arg, Target& result) {
|
||||||
result = static_cast<T&&>(arg); // eqaul to `result = std::forward<T>(arg);`
|
result = static_cast<T&&>(arg); // eqaul to `result = std::forward<T>(arg);`
|
||||||
@@ -2250,7 +2251,8 @@ namespace boost {
|
|||||||
|
|
||||||
namespace conversion { namespace detail {
|
namespace conversion { namespace detail {
|
||||||
|
|
||||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
// MSVC fail to forward an array. This error is reported to MSVC's developer.
|
||||||
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MSVC)
|
||||||
template <typename Target, typename Source>
|
template <typename Target, typename Source>
|
||||||
inline bool try_lexical_convert(Source&& arg, Target& result)
|
inline bool try_lexical_convert(Source&& arg, Target& result)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user