Created
March 10, 2023 13:08
-
-
Save afabri/fcd036af9a1258b3d9d0bfd9977fd932 to your computer and use it in GitHub Desktop.
Problem with expression templates of boost::mp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/multiprecision/cpp_int.hpp> | |
typedef boost::multiprecision::cpp_rational Rat; | |
struct E { | |
Rat rat; | |
E(const Rat& rat) | |
: rat(rat) | |
{} | |
}; | |
int main() | |
{ | |
Rat r(1,3); | |
E e = 2 * r; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment