Skip to content

Commit 025b7b2

Browse files
committed
Fix gcc13 compiling problems.
1 parent 1ea4f51 commit 025b7b2

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@
6666
"cinttypes": "cpp",
6767
"typeindex": "cpp",
6868
"typeinfo": "cpp",
69-
"variant": "cpp"
69+
"variant": "cpp",
70+
"codecvt": "cpp",
71+
"cfenv": "cpp",
72+
"filesystem": "cpp"
7073
},
7174
"C_Cpp.files.exclude": {
7275
"/usr/local/include/libmolgrid/**": true

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
1212
endif()
1313

1414
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
15+
set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES OFF)
1516

1617
option(BUILD_SHARED "Build shared library" ON)
1718
option(BUILD_STATIC "Build static library" ON)

python/bindings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define TYPEARG(Z, N, T) BOOST_PP_COMMA_IF(N) T
2727
#define NTYPES(N, T) BOOST_PP_REPEAT(N, TYPEARG, T)
2828

29+
2930
extern bool python_gpu_enabled;
3031
bool init_numpy();
3132

python/bindings.in.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ std::vector< std::vector<T> > listlist_to_vecvec(list l) {
190190
class PythonCallbackIndexTyper: public CallbackIndexTyper {
191191

192192
boost::python::object callback;
193-
193+
using CallbackIndexTyper::get_atom_type_index;
194194
public:
195195

196196
/// iniitalize callbacktyper, if names are not provided, numerical names will be generated
@@ -217,7 +217,7 @@ class PythonCallbackIndexTyper: public CallbackIndexTyper {
217217
class PythonCallbackVectorTyper: public CallbackVectorTyper {
218218

219219
boost::python::object callback;
220-
220+
using CallbackVectorTyper::get_atom_type_vector;
221221
public:
222222

223223
/// iniitalize callbacktyper, if names are not provided, numerical names will be generated
@@ -555,7 +555,7 @@ MAKE_ALL_GRIDS()
555555
init<object, unsigned, list>(
556556
(arg("func"), arg("num_types"), arg("names") = list() ) ))
557557
.def("num_types", &PythonCallbackIndexTyper::num_types)
558-
.def("get_atom_type_index", &PythonCallbackIndexTyper::get_atom_type_index)
558+
.def<std::pair<int,float> (PythonCallbackIndexTyper::*)(object a) const>("get_atom_type_index", &PythonCallbackIndexTyper::get_atom_type_index)
559559
.def("get_type_names",&PythonCallbackIndexTyper::get_type_names);
560560
implicitly_convertible<std::shared_ptr<PythonCallbackIndexTyper>, std::shared_ptr<AtomTyper> >();
561561

@@ -574,7 +574,7 @@ MAKE_ALL_GRIDS()
574574
init<object, unsigned, list>(
575575
(arg("func"), arg("num_types"), arg("names") = list() ) ))
576576
.def("num_types", &PythonCallbackVectorTyper::num_types)
577-
.def("get_atom_type_vector", &PythonCallbackVectorTyper::get_atom_type_vector)
577+
.def< tuple (PythonCallbackVectorTyper::*)(object a) const >("get_atom_type_vector", &PythonCallbackVectorTyper::get_atom_type_vector)
578578
.def("get_type_names",&PythonCallbackVectorTyper::get_type_names);
579579
implicitly_convertible<std::shared_ptr<PythonCallbackVectorTyper>, std::shared_ptr<AtomTyper> >();
580580

0 commit comments

Comments
 (0)