packages-cpp icon indicating copy to clipboard operation
packages-cpp copied to clipboard

The SWI-Prolog C++ interface

Results 9 packages-cpp issues
Sort by recently updated
recently updated
newest added

Running the tests with ``` $HOME//src/swipl-devel/build/src/swipl "-p" "foreign=" "-f" "none" "--no-packs" "--on-error=status" "-s" "$HOME/src/swipl-devel/packages/cpp/test_cpp.pl" ``` ``` ?- average(X, foo(X), Average). ERROR: Unknown procedure: foo/1 ERROR: In: ERROR: [13] foo(_6142) ERROR:...

The reason is given here: https://google.github.io/styleguide/cppguide.html#Namespaces This would require users of SWI-cpp2.h to add a "using namespace swi_cpp2;" or add "swi_cpp2::" to all references to items in SWI-cpp2.h.

All classes that contain a pointer or similar need to define a move constructor as well as a copy constructor because the default move constructor doesn't do the right thing....

There should be no need to use the "record" API for the error term. However, there appear to be some corner cases with PlQuery that can create an error term...

Quoting @JanWielemaker in a code review (https://github.com/SWI-Prolog/packages-cpp/pull/31): Overall, PL_scan_options() is an ok interface from C, but I think it needs a serious redesign for C++. Variadic argument functions and this...

Rationale: If a `PlFrame` object is passed by value, the implicity generated copy constructor creates another `PlFrame` that holds the same `fid` value. We now have two references to the...

I have a beginner question about the SWI-Prolog C++ interface. If this is the wrong place to post such a question, I apologize and ask: Where should I ask such...

In the following `main.pl` is an empty file. If it's specified, `swipl-ld` honours the `-goal true` and if it's not specified, I get the standard SWI-Prolog banner. ``` $ swipl-ld...