Merge pull request #650 from mocabe/ArrayWrapper1D-conversion

Small fix for ArrayWrapper1D's conversion operators
This commit is contained in:
Andreas Süßenbach 2020-07-02 09:20:02 +02:00 committed by GitHub
commit 5da023d17a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -6970,14 +6970,14 @@ int main( int argc, char ** argv )
}
template <typename B = T, typename std::enable_if<std::is_same<B, char>::value, int>::type = 0>
operator std::string const () const VULKAN_HPP_NOEXCEPT
operator std::string() const
{
return std::string( this->data() );
}
#if 17 <= VULKAN_HPP_CPP_VERSION
template <typename B = T, typename std::enable_if<std::is_same<B, char>::value, int>::type = 0>
operator std::string_view const () const VULKAN_HPP_NOEXCEPT
operator std::string_view() const
{
return std::string_view( this->data() );
}

View File

@ -49,7 +49,7 @@ int main( int /*argc*/, char ** /*argv*/ )
for ( auto const & layerProperty : layerProperties )
{
std::vector<vk::ExtensionProperties> extensionProperties =
vk::enumerateInstanceExtensionProperties( std::string( layerProperty.layerName ) );
vk::enumerateInstanceExtensionProperties( vk::Optional<const std::string>( layerProperty.layerName ) );
propertyData.push_back( PropertyData( layerProperty, extensionProperties ) );
}

View File

@ -379,14 +379,14 @@ namespace VULKAN_HPP_NAMESPACE
}
template <typename B = T, typename std::enable_if<std::is_same<B, char>::value, int>::type = 0>
operator std::string const() const VULKAN_HPP_NOEXCEPT
operator std::string() const
{
return std::string( this->data() );
}
#if 17 <= VULKAN_HPP_CPP_VERSION
template <typename B = T, typename std::enable_if<std::is_same<B, char>::value, int>::type = 0>
operator std::string_view const() const VULKAN_HPP_NOEXCEPT
operator std::string_view() const
{
return std::string_view( this->data() );
}