forked from boostorg/config
Config.msvc-15.5: Fix tests that can't pass in C++17.
This commit is contained in:
1 parent
ac0cc94982
commit
305f5a58ef
4 files changed
+33
-15
No files matched your search
@@ -28,6 +28,7 @@ template <class T>
|
||||
int test_allocator(const T& i)
|
||||
{
|
||||
typedef std::allocator<int> alloc1_t;
|
||||
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
||||
typedef typename alloc1_t::size_type size_type;
|
||||
typedef typename alloc1_t::difference_type difference_type BOOST_UNUSED_ATTRIBUTE;
|
||||
typedef typename alloc1_t::pointer pointer;
|
||||
@@ -35,9 +36,10 @@ int test_allocator(const T& i)
|
||||
typedef typename alloc1_t::reference reference;
|
||||
typedef typename alloc1_t::const_reference const_reference;
|
||||
typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE;
|
||||
|
||||
#endif
|
||||
alloc1_t a1;
|
||||
|
||||
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
||||
pointer p = a1.allocate(1);
|
||||
const_pointer cp = p;
|
||||
a1.construct(p,i);
|
||||
@@ -49,7 +51,7 @@ int test_allocator(const T& i)
|
||||
if(cp != a1.address(cr)) return -1;
|
||||
a1.destroy(p);
|
||||
a1.deallocate(p,1);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user