forked from M-Labs/nalgebra
Add a non-const version of Point::new when the cuda feature is enabled
This commit is contained in:
parent
7adecdef6c
commit
1079f0c1c3
@ -216,9 +216,22 @@ macro_rules! componentwise_constructors_impl(
|
||||
#[doc = $doc]
|
||||
#[doc = "```"]
|
||||
#[inline]
|
||||
#[cfg(not(feature = "cuda"))]
|
||||
pub const fn new($($args: T),*) -> Self {
|
||||
Point { coords: $Vector::new($($args),*) }
|
||||
}
|
||||
|
||||
// TODO: always let new be const once CUDA updates its supported
|
||||
// nightly version to something more recent.
|
||||
#[doc = "Initializes this point from its components."]
|
||||
#[doc = "# Example\n```"]
|
||||
#[doc = $doc]
|
||||
#[doc = "```"]
|
||||
#[inline]
|
||||
#[cfg(feature = "cuda")]
|
||||
pub fn new($($args: T),*) -> Self {
|
||||
Point { coords: $Vector::new($($args),*) }
|
||||
}
|
||||
}
|
||||
)*}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user