Seems like adding the following line at the very start of the code makes the Armadillo functions work properly:
#define ARMA_DONT_USE_WRAPPER
I think that pretty much covers Armadillo, at least from my initial test.
Now what I’m having trouble with is trying to use gnuplot-iostream with Cling:
In file included from input_line_8:1:
In file included from ./gnuplot-iostream.h:81:
In file included from /usr/include/boost/filesystem.hpp:16:
In file included from /usr/include/boost/filesystem/path.hpp:21:
In file included from /usr/include/boost/filesystem/detail/path_traits.hpp:25:
In file included from /usr/include/boost/system/error_category.hpp:11:
In file included from /usr/include/boost/system/detail/error_category_impl.hpp:15:
/usr/include/boost/system/detail/error_code.hpp:590:33: error: conversion function from 'boost::system::error_code' to 'const std::error_code' invokes a deleted function
std::error_code e2( *this );
^~~~~
/usr/include/boost/system/detail/error_code.hpp:579:5: note: 'operator error_code' has been explicitly marked deleted here
operator std::error_code ()
^
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/system_error:245:33: note: passing argument to parameter here
error_code(const error_code&) = default;
^
In file included from input_line_8:1:
./gnuplot-iostream.h:155:23: warning: variable templates are a C++14 extension [-Wc++14-extensions]
static constexpr bool dont_treat_as_stl_container = false;
^
./gnuplot-iostream.h:159:23: warning: variable templates are a C++14 extension [-Wc++14-extensions]
static constexpr bool is_like_stl_container = false;
^
./gnuplot-iostream.h:162:48: error: no template named 'void_t' in namespace 'std'; did you mean 'boost::void_t'?
static constexpr bool is_like_stl_container<T, std::void_t<
^~~~~~~~~~~
boost::void_t
/usr/include/boost/type_traits/make_void.hpp:25:1: note: 'boost::void_t' declared here
using void_t = typename make_void<Ts...>::type;
^
In file included from input_line_8:1:
./gnuplot-iostream.h:168:55: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert( is_like_stl_container<std::vector<int>>);
^
, ""
./gnuplot-iostream.h:169:42: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert(!is_like_stl_container<int>);
^
, ""
./gnuplot-iostream.h:173:23: warning: variable templates are a C++14 extension [-Wc++14-extensions]
static constexpr bool is_like_stl_container2 = false;
^
./gnuplot-iostream.h:176:49: error: no template named 'void_t' in namespace 'std'; did you mean 'boost::void_t'?
static constexpr bool is_like_stl_container2<T, std::void_t<
^~~~~~~~~~~
boost::void_t
/usr/include/boost/type_traits/make_void.hpp:25:1: note: 'boost::void_t' declared here
using void_t = typename make_void<Ts...>::type;
^
In file included from input_line_8:1:
./gnuplot-iostream.h:183:23: warning: variable templates are a C++14 extension [-Wc++14-extensions]
static constexpr bool is_boost_tuple_nulltype =
^
./gnuplot-iostream.h:184:10: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
std::is_same_v<T, boost::tuples::null_type>;
~~~~~^~~~~~~~~
is_same
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/type_traits:1393:12: note: 'is_same' declared here
struct is_same
^
In file included from input_line_8:1:
./gnuplot-iostream.h:184:48: error: expected '(' for function-style cast or type construction
std::is_same_v<T, boost::tuples::null_type>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
./gnuplot-iostream.h:183:23: error: constexpr variable declaration must be a definition
static constexpr bool is_boost_tuple_nulltype =
^
./gnuplot-iostream.h:186:15: note: in instantiation of variable template specialization 'gnuplotio::is_boost_tuple_nulltype<boost::tuples::null_type>' requested here
static_assert(is_boost_tuple_nulltype<boost::tuples::null_type>);
^
./gnuplot-iostream.h:186:64: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert(is_boost_tuple_nulltype<boost::tuples::null_type>);
^
, ""
./gnuplot-iostream.h:186:15: error: static_assert expression is not an integral constant expression
static_assert(is_boost_tuple_nulltype<boost::tuples::null_type>);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gnuplot-iostream.h:189:23: warning: variable templates are a C++14 extension [-Wc++14-extensions]
static constexpr bool is_boost_tuple = false;
^
./gnuplot-iostream.h:192:41: error: no template named 'void_t' in namespace 'std'; did you mean 'boost::void_t'?
static constexpr bool is_boost_tuple<T, std::void_t<
^~~~~~~~~~~
boost::void_t
/usr/include/boost/type_traits/make_void.hpp:25:1: note: 'boost::void_t' declared here
using void_t = typename make_void<Ts...>::type;
^
In file included from input_line_8:1:
./gnuplot-iostream.h:197:49: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert( is_boost_tuple<boost::tuple<int>>);
^
, ""
./gnuplot-iostream.h:197:16: error: static_assert expression is not an integral constant expression
static_assert( is_boost_tuple<boost::tuple<int>>);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gnuplot-iostream.h:183:23: error: constexpr variable declaration must be a definition
static constexpr bool is_boost_tuple_nulltype =
^
./gnuplot-iostream.h:195:51: note: in instantiation of variable template specialization 'gnuplotio::is_boost_tuple_nulltype<boost::tuples::cons<int, boost::tuples::null_type> >'
requested here
>> = is_boost_tuple<typename T::tail_type> || is_boost_tuple_nulltype<typename T::tail_type>;
^
./gnuplot-iostream.h:198:16: note: in instantiation of variable template specialization 'gnuplotio::is_boost_tuple<boost::tuples::tuple<int, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>, void>' requested here
static_assert( is_boost_tuple<boost::tuple<int, int>>);
^
./gnuplot-iostream.h:195:10: error: constexpr variable 'is_boost_tuple<boost::tuples::tuple<int, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, void>' must
be initialized by a constant expression
>> = is_boost_tuple<typename T::tail_type> || is_boost_tuple_nulltype<typename T::tail_type>;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gnuplot-iostream.h:198:16: note: in instantiation of variable template specialization 'gnuplotio::is_boost_tuple<boost::tuples::tuple<int, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>, void>' requested here
static_assert( is_boost_tuple<boost::tuple<int, int>>);
^
./gnuplot-iostream.h:198:54: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert( is_boost_tuple<boost::tuple<int, int>>);
^
, ""
./gnuplot-iostream.h:198:16: error: static_assert expression is not an integral constant expression
static_assert( is_boost_tuple<boost::tuple<int, int>>);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gnuplot-iostream.h:198:16: note: initializer of 'is_boost_tuple<boost::tuples::tuple<int, int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, void>' is not
a constant expression
./gnuplot-iostream.h:192:23: note: declared here
static constexpr bool is_boost_tuple<T, std::void_t<
^
./gnuplot-iostream.h:199:47: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert(!is_boost_tuple<std::tuple<int>>);
^
, ""
./gnuplot-iostream.h:200:52: warning: static_assert with no message is a C++17 extension [-Wc++17-extensions]
static_assert(!is_boost_tuple<std::tuple<int, int>>);
^
, ""
./gnuplot-iostream.h:575:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<is_boost_tuple<T>>
~~~~~~~~~~~~~~^~~~~~~~~~~
./gnuplot-iostream.h:588:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<is_boost_tuple<T>>
~~~~~~~~~~~~~~^~~~~~~~~~~
./gnuplot-iostream.h:601:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<is_boost_tuple<T>>
~~~~~~~~~~~~~~^~~~~~~~~~~
./gnuplot-iostream.h:805:33: error: no template named 'conditional_t' in namespace 'std'; did you mean 'boost::conditional_t'?
using value_type = typename std::conditional_t<is_container, Error_InappropriateDeref, TV>;
^~~~~~~~~~~~~~~~~~
boost::conditional_t
/usr/include/boost/type_traits/conditional.hpp:21:40: note: 'boost::conditional_t' declared here
template <bool b, class T, class U> using conditional_t = typename conditional<b, T, U>::type;
^
In file included from input_line_8:1:
./gnuplot-iostream.h:837:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<is_like_stl_container<T>>
~~~~~~~~~~~~~~^~~~~~~~~~~
./gnuplot-iostream.h:849:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<is_like_stl_container2<T>>
~~~~~~~~~~~~~~^~~~~~~~~~~
./gnuplot-iostream.h:948:19: error: no type named 'enable_if_t' in namespace 'std'
typename std::enable_if_t<
~~~~~~~~~~~~~~^~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Compiling the same code normally with g++ does work without any errors, it’s only through Cling that these appear.
Should I open a new thread for the gnuplot errors or can I continue in this one?