-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cml::vector<const double *, cml::dynamic<>> problem #43
Comments
Hi wzhy,
The first template argument should be a basic numeric type; e.g. using vector_pdd = cml::vector<double, cml::dynamic<>>; Alternatively, you can use the matching predefined vector type from cml/vector/types.h; e.g.: using vector_pdd = cml::vectord;
Unfortunately, I only have the in-source, Doxygen-formatted documentation right now. Apparently, real documentation has been on my list for some time (#7)! The tests may also be useful for seeing how things fit together. Let me know if you have any more trouble with the compiler error. |
Thanks for your reply, demianmnave!
Now I want to immigrate CML to V2.2.1 release. So problem occurs. BTW: CML_VERSION and CML_VERSION_STRING in /cml/version.h in the V2.2.1 release may be modified to 2.2.1^^ |
Yikes, that sounds like a challenge! I don't know if CML2 will be the right fit since it keeps tighter control over the types it understands (essentially, numeric-like types). That said, you could try specializing namespace cml {
/** Specialization of scalar traits for pointer types. */
template<typename Base> struct scalar_traits<Base*, void>
: detail::default_integral_traits<unsigned long long>
{
static constexpr Scalar sqrt_epsilon() { return 0; }
};
/** Specialization of scalar traits for pointer const types. */
template<typename Base> struct scalar_traits<const Base*, void>
: detail::default_integral_traits<unsigned long long>
{
static constexpr Scalar sqrt_epsilon() { return 0; }
};
} If the code does not rely on math operators, you might have better luck swapping out |
Hi Demian, |
Hi Will, glad you figured it out without having to do anything fancy! Good luck with your project, and feel free to submit another issue if you run into any more problems. |
Have a nice weekend^^ |
Hi!
I wrote code like this in a header file:
typedef cml::vector<const double *, cml::dynamic<>> vector_pdd;
Then
cml::vector_cpdd pData;
I got some errors when compiling it :
How can I fix this ? I'm new in C++...
And [http://cmldev.net/] can not open. So is there any doc about CML?
Thank you very much!
The text was updated successfully, but these errors were encountered: