mizvekov / fp Goto Github PK
View Code? Open in Web Editor NEWFixed Point Arithmetic C++14 Library
License: ISC License
Fixed Point Arithmetic C++14 Library
License: ISC License
I am just wondering if anyone has this working under VS2017, I am unable to build without a number of errors.
I am attempting to compile
auto x = make_fp<int64_t, 32 >(3.25);
auto y = make_fp<int64_t, 32>(0.75);
auto z = x * y;
std::cout << double(z);
Severity Code Description Project File Line Suppression State
Error C2893 Failed to specialize function template 'unknown-type std::multiplies::operator ()(_Ty1 &&,_Ty2 &&) const' fixed_point f:\mtsbx\fp\fp.hpp 186
Error C2893 Failed to specialize function template 'auto fp::fp_t<int64_t,32,A (__cdecl *)(const __int64 &)>::make(const A &)' fixed_point f:\mtsbx\fp\fp.hpp 192
Error C2677 binary '<<': no global operator found which takes type 'std::integral_constant<__int64,0>' (or there is no acceptable conversion) fixed_point f:\mtsbx\fp\fp.hpp 68
Error C3313 'z': variable cannot have the type 'void' fixed_point f:\mtsbx\fixed_point\fixed_point\main.cpp 20
Error C3536 'z': cannot be used before it is initialized fixed_point f:\mtsbx\fixed_point\fixed_point\main.cpp 21
Error C2512 'std::is_integral<_Ty>': no appropriate default constructor available fixed_point f:\mtsbx\fp\fp.hpp 43
Error C2512 'std::is_floating_point<_Ty>': no appropriate default constructor available fixed_point f:\mtsbx\fp\fp.hpp 47
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Timeobj<_Elem2,const tm> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Smanip<_Arg> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Quote_out<_Elem,_QuTraits,_Sizet> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Quote_in<_Elem,_Traits,_Alloc> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Monobj<_Money> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::_Fillobj<_Elem2> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::shared_ptr<_Ty> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string<_Elem,_Traits,_Alloc> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,const _Ty &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &&' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<_Elem,_Tr> &std::operator <<(std::basic_ostream<_Elem,_Tr> &,const std::complex<_Other> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Tr> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2784 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)': could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'int64_t (__cdecl *const )(const __int64 &)' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2672 'operator __surrogate_func': no matching overloaded function found fixed_point f:\mtsbx\fp\fp.hpp 183
Warning C4244 'initializing': conversion from 'double' to 'const int64_t', possible loss of data fixed_point f:\mtsbx\fp\fp.hpp 40
Error C2512 'fp::is_fp': no appropriate default constructor available fixed_point f:\mtsbx\fp\fp.hpp 98
Error C2512 'fp::is_fp': no appropriate default constructor available fixed_point f:\mtsbx\fp\fp.hpp 102
Error C2672 'fp::fp_t<int64_t,32,A (__cdecl *)(const __int64 &)>::make': no matching overloaded function found fixed_point f:\mtsbx\fp\fp.hpp 190
Error C2535 'fp::fp_t<int64_t,32,A (__cdecl *)(const __int64 &)>::fp_t(const B &,enable_if<_Test,_Ty>::type *)': member function already defined or declared fixed_point f:\mtsbx\fp\fp.hpp 102
Error C2572 'fp::fp_t<int64_t,32,A (__cdecl *)(const __int64 &)>::fp_t': redefinition of default argument: parameter 1 fixed_point f:\mtsbx\fp\fp.hpp 102
Error C2783 'auto fp::operators::operator <<(const T &,const std::integral_constant<B,V> &)': could not deduce template argument for '' fixed_point f:\mtsbx\fp\fp.hpp 68
Error C2995 'auto fp::detail::builtin_const_shift(const enable_if<_Test,T>::type &)': function template has already been defined fixed_point f:\mtsbx\fp\fp.hpp 49
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.