Add .travis.yml

This commit is contained in:
Jonathan Müller 2017-04-20 12:17:00 +02:00
commit 1420abc81b
14 changed files with 82 additions and 13 deletions

View file

@ -5,6 +5,8 @@
#ifndef CPPAST_CPP_ENTITY_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_HPP_INCLUDED
#include <string>
#include <type_safe/optional_ref.hpp>
#include <cppast/detail/intrusive_list.hpp>

View file

@ -28,7 +28,7 @@ namespace cppast
// FNV-1a 64 bit hash
constexpr std::size_t id_hash(const char* str, std::size_t hash = fnv_basis)
{
return *str ? id_hash(str + 1, (hash ^ *str) * fnv_prime) : hash;
return *str ? id_hash(str + 1, (hash ^ std::size_t(*str)) * fnv_prime) : hash;
}
} // namespace detail
@ -50,7 +50,7 @@ namespace cppast
inline namespace literals
{
/// \returns A new [cppast::cpp_entity_id]() created from the given string.
inline cpp_entity_id operator""_id(const char* str, std::size_t)
inline cpp_entity_id operator"" _id(const char* str, std::size_t)
{
return cpp_entity_id(str);
}