Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e98bf36

Browse files
author
Davide Faconti
committed
fix windows compilation
1 parent 38a6db7 commit e98bf36

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

include/behaviortree_cpp/utils/make_unique.hpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
#include <memory>
44

5-
// https://en.cppreference.com/w/cpp/feature_test
6-
#if not __has_cpp_attribute(__cpp_lib_make_unique)
5+
#if defined(_MSC_VER) && __cplusplus == 201103L
6+
# define MAKE_UNIQUE_DEFINED 1
7+
#endif
8+
9+
#ifdef __cpp_lib_make_unique
10+
# define MAKE_UNIQUE_DEFINED 1
11+
#endif
12+
13+
#ifndef MAKE_UNIQUE_DEFINED
714

815
//The compiler doesn't provide it, so implement it ourselves.
916

0 commit comments

Comments
 (0)