Commit a44619c
authored
Fix compilation error when targeting C++23 (BehaviorTree#926)
Compilation fails if cxx_std_17 is changed to cxx_std_23 because expected_lite namespace is not defined. Commit fixes this.
/home/vincent/BehaviorTree.CPP/include/behaviortree_cpp/json_export.h:117: error: ‘nonstd::expected_lite’ has not been declared; did you mean ‘nonstd::unexpected_type’? [-Wtemplate-body]
In file included from /home/vincent/BehaviorTree.CPP/src/blackboard.cpp:3:
/home/vincent/BehaviorTree.CPP/include/behaviortree_cpp/json_export.h: In member function ‘BT::Expected<T> BT::JsonExporter::fromJson(const nlohmann::json_abi_v3_11_3::json&) const’:
/home/vincent/BehaviorTree.CPP/include/behaviortree_cpp/json_export.h:117:20: error: ‘nonstd::expected_lite’ has not been declared; did you mean ‘nonstd::unexpected_type’? [-Wtemplate-body]
117 | return nonstd::expected_lite::make_unexpected(res.error());
| ^~~~~~~~~~~~~1 parent c23f8ed commit a44619c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments