Skip to content

Commit 460d649

Browse files
Merge pull request #161 from unvestigate/master
A couple of small changes needed to build on MSVC2015
2 parents 4f30e3a + f15b8c7 commit 460d649

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

include/behaviortree_cpp_v3/utils/make_unique.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <memory>
44

5-
#if defined(_MSC_VER) && __cplusplus == 201103L
5+
#if defined(_MSC_VER) && _MSC_VER >= 1900 // MSVC 2015 or newer.
66
# define MAKE_UNIQUE_DEFINED 1
77
#endif
88

include/behaviortree_cpp_v3/utils/string_view.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,14 @@ nssv_constexpr bool operator== (
891891
basic_string_view <CharT, Traits> rhs ) nssv_noexcept
892892
{ return lhs.compare( rhs ) == 0 ; }
893893

894+
template< class CharT, class Traits >
895+
nssv_constexpr bool operator== (
896+
basic_string_view <CharT, Traits> lhs,
897+
CharT const * rhs) nssv_noexcept
898+
{
899+
return lhs.compare(rhs) == 0;
900+
}
901+
894902
template< class CharT, class Traits >
895903
nssv_constexpr bool operator!= (
896904
basic_string_view <CharT, Traits> lhs,

0 commit comments

Comments
 (0)