You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the c++2rst function CL.parse encounters problems inside of triqs
[ 67%] Generating c++2rst.log
cd /Users/hugstr/dev/tprf/cbuild/doc && /Users/hugstr/apps/cpp2py/bin/c++2rst --namespace tprf /Users/hugstr/dev/tprf/doc/reference/doc_root.hpp --output_directory=/Users/hugstr/dev/tprf/cbuild/doc/cpp2doc_generated --includes=/Users/hugstr/dev/tprf/ -I /opt/local/include/openmpi-clang40 -I /opt/local/include -I /opt/local/include -I /opt/local/include -I /opt/local/include 2>&1 > c++2rst.log
Traceback (most recent call last):
File "/Users/hugstr/apps/cpp2py/bin/c++2rst", line 36, in <module>
libclang_location = args.libclang_location
File "/Users/hugstr/apps/cpp2py/lib/python2.7/site-packages/cpp2rst/cpp2rst.py", line 60, in __init__
self.root = CL.parse(filename, compiler_options, includes, libclang_location, parse_all_comments)
File "/Users/hugstr/apps/cpp2py/lib/python2.7/site-packages/cpp2py/clang_parser.py", line 356, in parse
raise RuntimeError, s + "\n... Your code must compile before using clang-parser !"
RuntimeError: Clang reports the following errors in parsing
file /Users/hugstr/apps/triqs_devel/include/triqs/./gfs/../utility/complex_ops.hpp line 5 col 38
expected a type file /Users/hugstr/apps/triqs_devel/include/triqs/./gfs/../utility/complex_ops.hpp line 6 col 38
expected a type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 75 col 5
'auto' not allowed in function return type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 75 col 41
expected ';' at end of declaration list file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 82 col 5
'auto' not allowed in function return type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 82 col 41
expected ';' at end of declaration list file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 88 col 5
'auto' not allowed in function return type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 88 col 41
expected ';' at end of declaration list file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 123 col 14
unknown type name 'constexpr' file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 123 col 30
expected ';' at end of declaration list file /Users/hugstr/apps/triqs_devel/include/triqs/utility/c14.hpp line 131 col 66
a space is required between consecutive right angle brackets (use '> >') file /Users/hugstr/apps/triqs_devel/include/triqs/utility/is_complex.hpp line 27 col 55
a space is required between consecutive right angle brackets (use '> >') file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 32 col 31
expected function body after function declarator file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 118 col 67
expected expression file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 118 col 24
'auto' not allowed in function return type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 118 col 105
expected ';' at end of declaration file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 118 col 106
cannot use arrow operator on a type file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 119 col 67
expected expression file /Users/hugstr/apps/triqs_devel/include/triqs/utility/../mpi/./base.hpp line 119 col 24
'auto' not allowed in function return type file None line 0 col 0
too many errors emitted, stopping now
... Your code must compile before using clang-parser !
make[2]: *** [doc/c++2rst.log] Error 1
make[2]: *** Deleting file `doc/c++2rst.log'
make[1]: *** [doc/CMakeFiles/doc_cpp2doc.dir/all] Error 2
make: *** [all] Error 2
am I doing something wrong when calling c++2rst in the above?
you need to pass -std=c++14 or 17 in the --cxxflags argument.
Cf cthyb/python/..desc file
c++2py does not assume a given standard, it probably should but @Wentzell voted against it ... @Wentzell: opinion ?
c++2py does not assume a given standard, it probably should but @Wentzell voted against it ...
I guess forcing the standard used by the library (C++14) would render cpp2py unusable for C++17 applications. A middle ground solution I can see is to assume -std=c++14 and optionally override it with whatever passed in --cxxflags.
The pb is that if you have both -std (e.g. if we put it in the TRIQS target)
the order of the options determines the result, so it is quite confusing.
So with @Wentzell, we thought not to put -std in lib, c++2py ...
Hi, I am trying to use
c++2rst
to generate the doc fortprf
https://github.com/HugoStrand/tprf
But the
c++2rst
functionCL.parse
encounters problems inside oftriqs
am I doing something wrong when calling
c++2rst
in the above?The text was updated successfully, but these errors were encountered: