mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Ignore warnings in some tests; fix ambiguity in ArrayWrapper test (#1712)
This commit is contained in:
parent
9c15a1e1ef
commit
de5821703f
@ -22,7 +22,7 @@
|
|||||||
#elif defined( __GNUC__ )
|
#elif defined( __GNUC__ )
|
||||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||||
#else
|
#else
|
||||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
// no need to ignore any warnings with MSVC
|
// no need to ignore any warnings with MSVC
|
||||||
|
#elif defined( __clang__ )
|
||||||
|
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||||
#elif defined( __GNUC__ )
|
#elif defined( __GNUC__ )
|
||||||
# if ( 9 <= __GNUC__ )
|
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||||
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -33,7 +33,9 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
|
|
||||||
// s1 = aw1; // 'operator =' is ambiguous
|
// s1 = aw1; // 'operator =' is ambiguous
|
||||||
|
|
||||||
vk::ArrayWrapper1D<char, 20> aw2( "foobah" );
|
std::string foobah = "foobah";
|
||||||
|
|
||||||
|
vk::ArrayWrapper1D<char, 20> aw2( foobah );
|
||||||
f( aw2 );
|
f( aw2 );
|
||||||
|
|
||||||
vk::ArrayWrapper1D<char, 5> aw3( { 'f', 'o', 'o', 'b', 'a', 'h' } );
|
vk::ArrayWrapper1D<char, 5> aw3( { 'f', 'o', 'o', 'b', 'a', 'h' } );
|
||||||
@ -41,7 +43,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||||||
assert( s3.length() == 5 );
|
assert( s3.length() == 5 );
|
||||||
std::cout << "<" << s3 << ">" << std::endl;
|
std::cout << "<" << s3 << ">" << std::endl;
|
||||||
|
|
||||||
vk::ArrayWrapper1D<char, 5> aw4( "foobah" );
|
vk::ArrayWrapper1D<char, 5> aw4( foobah );
|
||||||
std::string s4 = aw4;
|
std::string s4 = aw4;
|
||||||
assert( s4.length() == 5 );
|
assert( s4.length() == 5 );
|
||||||
|
|
||||||
|
@ -27,6 +27,19 @@ static std::string EngineName = "Vulkan.hpp";
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class MyAllocator : public std::allocator<T>
|
class MyAllocator : public std::allocator<T>
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
MyAllocator() = default;
|
||||||
|
|
||||||
|
template <class U>
|
||||||
|
MyAllocator( const MyAllocator<U> & /*unused*/ )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class U>
|
||||||
|
struct rebind
|
||||||
|
{
|
||||||
|
using other = MyAllocator<U>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vk::UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( vk::Device const & device,
|
vk::UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( vk::Device const & device,
|
||||||
|
Loading…
Reference in New Issue
Block a user