mirror of
https://github.com/boostorg/core.git
synced 2025-07-31 05:17:22 +02:00
Merge pull request #116 from boostorg/feature/span_boost_begin_test
Add test around the MSVC defect
This commit is contained in:
@ -331,6 +331,7 @@ run span_constructible_test.cpp ;
|
|||||||
run span_deduction_guide_test.cpp ;
|
run span_deduction_guide_test.cpp ;
|
||||||
run as_bytes_test.cpp ;
|
run as_bytes_test.cpp ;
|
||||||
run as_writable_bytes_test.cpp ;
|
run as_writable_bytes_test.cpp ;
|
||||||
|
compile span_boost_begin_test.cpp ;
|
||||||
|
|
||||||
run splitmix64_test.cpp
|
run splitmix64_test.cpp
|
||||||
: : : $(pedantic-errors) ;
|
: : : $(pedantic-errors) ;
|
||||||
|
37
test/span_boost_begin_test.cpp
Normal file
37
test/span_boost_begin_test.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 Glen Joseph Fernandes
|
||||||
|
(glenjofe@gmail.com)
|
||||||
|
|
||||||
|
Distributed under the Boost Software License, Version 1.0.
|
||||||
|
(http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
*/
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#if !defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CXX11_DECLTYPE)
|
||||||
|
#include <boost/core/span.hpp>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace begin_ {
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
void begin(T&) { }
|
||||||
|
|
||||||
|
} // begin_
|
||||||
|
|
||||||
|
using namespace begin_;
|
||||||
|
|
||||||
|
} // boost
|
||||||
|
|
||||||
|
template class boost::span<float>;
|
||||||
|
|
||||||
|
void function()
|
||||||
|
{
|
||||||
|
std::vector<int> y;
|
||||||
|
boost::begin(y);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
Reference in New Issue
Block a user