add copy/init from the same type but with the opposite caching strategy

This commit is contained in:
Sébastien Loriot 2024-10-25 08:57:31 +02:00
parent adc16b17f6
commit 3d4f2a3dd8
1 changed files with 11 additions and 0 deletions

View File

@ -135,6 +135,17 @@ public:
Sqrt_extension(const NT& i)
: a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {}
Sqrt_extension(const Sqrt_extension<NT, ROOT_, ACDE_TAG, std::integral_constant<bool, !FP_TAG::value>>& other)
: a0_(other.a0()), a1_(other.a1()), root_(other.root()), is_extended_(other.is_extended())
{}
Sqrt_extension&
operator=(const Sqrt_extension<NT, ROOT_, ACDE_TAG, std::integral_constant<bool,!FP_TAG::value>>& other)
{
*this = Sqrt_extension(other);
return *this;
}
//non-documented: used for Make_sqrt
Sqrt_extension(const ROOT& root,bool)
:a0_(NT(0)), a1_(NT(1)), root_(root), is_extended_(true) {}