亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tour-stdcxx.html

?? 密碼大家Shoup寫的數論算法c語言實現
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
To write NTL client code that will compile smoothly in eitherTraditional or ISO mode, one simply does the following:<pre>#include &lt;NTL/ZZ.h&gt;#ifdef NTL_STD_CXXusing namespace NTL;using namespace std;#endifint main(){   ZZ a, b, c;    cin &gt;&gt; a;    cin &gt;&gt; b;    c = (a+1)*(b+1);   cout &lt;&lt; c &lt;&lt; "\n";}</pre><p>Typically,when writing a program that uses NTL,you cansimply insert the "ifdef" as above,and forget about all this namespace nonsense.However, if you are combining libraries, you may have to disambiguatethings from time to time.<p>The Standard <tt>C++</tt> library is huge.If you just use <tt>&lt;iostream&gt;</tt>, you should nothave any ambiguous names.However, there are some potential ambiguities in other library components.One that I know of is the template class <tt>negate</tt>defined in <tt>&lt;functional&gt;</tt>, which conflicts with theNTL function <tt>negate</tt>.With namespaces, there should be no problem, unless the clientcode explicitly uses <tt>negate</tt>, in which case you willhave to explicitly qualify <tt>negate</tt> to tell the compilerwhich <tt>negate</tt> you mean, either <tt>std::negate</tt>or <tt>NTL::negate</tt>.<p>NTL also explicitly defines various versions of <tt>min</tt>and <tt>max</tt> functions.Template versions of these functions are also defined in thestandard library component <tt>&lt;algorithm&gt;</tt>.Because of the way the function overload resolution mechanism works, the "right" version of <tt>min</tt> or <tt>max</tt> should alwaysbe chosen, without any need for explicit qualification.<p>There may be other possible ambiguities between the standard libraryand NTL, but if they arise, they are easily fixed throughexplicit qualification.<p><h3>Some global names</h3><p>It is not quite true that <i>all</i> namesdeclared in NTL header files are wrapped in namespace NTL.There are two classes of exceptions:<p><ul><li>All names that start with the prefix "<tt>NTL_</tt>"are in fact <i>macros</i>.  There are a number of documented and undocumentedsuch macros.Note that any name with this prefix is a macro and all macrosstart with this prefix.<p><li>There are also a number of undocumented names that start with the prefix "<tt>_ntl_</tt>".These are not macros, but rather are names of functions, types, etc., that are declared in the global namespace.Any name with this prefix is in the global namespace,and all names in the global namespace start with this prefix.All functions with <tt>"C"</tt> linkage have this prefix.</ul><p>Thus, NTL "owns" all names starting with "<tt>NTL_</tt>" or "<tt>_ntl_</tt>";users of NTL should avoid names with these prefixes.<p><h3>Further technicalities</h3><p>Another thing to be aware of is that there are some small, annoyingdifferences between the old standard <tt>C</tt> include files<tt>&lt;stdlib.h&gt;</tt> and <tt>&lt;math.h&gt;</tt>,and the new <tt>C++</tt> include files <tt>&lt;cstdlib&gt;</tt> and <tt>&lt;cmath&gt;</tt>,above and beyond the namespace wrapping.Specifically, the new header files declare several overloaded versionsof some functions.For example, in the old header files, there was one function<pre>   int abs(int);</pre>Now there are several, including:<pre>   int abs(int);   long abs(long);   float abs(float);   double abs(double);   long double abs(long double);</pre>Also, functions like <tt>log</tt> and <tt>sqrt</tt> are also overloaded.So instead of just<pre>   double log(double);</pre>there are<pre>   float log(float);   double log(double);   long double log(long double);</pre><p>This can lead to compile-time errors in some old codes, such as:<pre>   double log_2 = log(2);</pre><p>With the old header files, the <tt>int</tt> value 2 would havebeen converted to a <tt>double</tt>, and the function <pre>   double log(double);</pre>would have been called.<p>With the new header files, the compiler would raise an error,because the function call is now ambiguous.<p>Of course, the fix is trivial:<pre>   double log_2 = log(2.0);</pre>This will compile correctly with either old or new header files.<p>Don't you just love the ISO?<p><h3>A note on documentation</h3><p>The "<tt>.txt</tt>" files documenting NTL's modulesstill reflect NTL's  Traditional mode.There should be no confusion in interpretting the meaning in ISO mode.Just remember: all of NTL is wrapped in namespace <tt>NTL</tt>,and the standard library is wrapped in namespace <tt>std</tt>.<p><h3>Further changes in NTL version 4.1</h3><p>The ISO Standard for <tt>C++</tt> is not compatible with thelanguage defined in the second edition of Stroustrup's <tt>C++</tt> book.This is in fact quite annoying.Besides introducing namespaces, several modifications were madein version 4.1 that will allow NTL to be compiled smoothly under<i>either</i> the old or the new definition of the language(or any reasonable approximation thereof).These changes do not affect the (documented) NTL interface,and so version 4.1 should be backward compatible.<p>Here is a summary of the other changes:<ul><li>Got rid of all <tt>friend</tt> functions.It turns out that new <tt>C++</tt> and old <tt>C++</tt> disagree quite strongly about the semantics of a <tt>friend</tt> functiondeclaration.In getting rid of these, I also made a number of fields publicwhich used to be private, but to prevent accidental misuse,I gave them strange names (e.g., the previouslyprivate member <tt>rep</tt> in class <tt>ZZ_p</tt>is now the public member <tt>_ZZ_p__rep</tt>).<p>This change is effective in both Traditional and ISO modes.<p>In my view, the ISO committee really committed an act of sabotage here.Now the <tt>friend</tt> mechanism is much more awkward than before,which makes the use of private members more awkward,which simply encourages programmers (like me) to avoid them altogether.<p><li>When compiling in ISO mode, all calls to <tt>new</tt>have been replaced by <tt>new(std::nothrow)</tt>.<p>The ISO committee also committed an act of sabotage when they changedthe semantics of the memory allocation operator <tt>new</tt>.In old <tt>C++</tt>, a memory allocation error simply returneda null pointer; in new <tt>C++</tt> an exception is thrown.The old semantics are available via  <tt>new(std::nothrow)</tt>.<p>You may of course use NTL in Traditional mode with a compiler thatimplements the new semantics for <tt>new</tt>.In this case, if the memory allocation fails, an exception willbe thrown, and assuming you don't catch it, you will simply get anerror message that is less informative than the one NTL wouldhave printed.Also, your compiler may have a backward compatatibilty flag to use the old <tt>new</tt> semantics.<p><li>Various and sundry other small changes, such as fixingoccurrences of thethe "<tt>log(2)</tt>" problem mentioned above.</ul><p><p><h3>Standard C++ and the Real World</h3><p>At the time of this writing, I know of no compiler that actuallyimplements the new <tt>C++</tt> standard.Some come closer than others.<p>The compiler that comes the closest is the one available (for a price) from <a href="http://www.kai.com">www.kai.com</a>.One of the things it does not do correctly is that the globalnamespace is partially polluted with some function names from the standard<tt>C</tt> library, even if you use header files that are supposedto wrap them in namespace <tt>std</tt> (these names are alsoin namespace <tt>std</tt>).Besides this problem, and the fact there are a couple of <i>very</i>esoteric language features not yet implemented, the <i>KAI</i>compiler does a reasonable job.<p>I used this compiler (version 3.4g,  with the "--strict" flag) to make sure NTLworked correctly under the new standard (which was not entirely trivial),in either Traditional or ISO mode.<p>NTL also compiles correctly in in either Traditional or ISOmode using recent versions of the <i>GNU</i> compiler (which is free);I checked it with <i>egcs-2.91.66</i> and <i>gcc-2.95.2</i>.This compiler is still some distancefrom implementing standard <tt>C++</tt>, but is getting closer.There are several language features that are not yet implementedcorrectly, and also the <i>entire</i> contents of the standard <tt>C++</tt>library are visible in the global namespace (as well as namespace <i>std</i>).Nevertheless, NTL can still be used in ISO mode with the<i>GNU</i> compiler,as long as one is aware of the limitations of this compiler.<p>It has also been reported thatNTL compiles correctly in ISO mode using theMetroworks CodeWarrior Pro 5, v. 5.3 compiler on a PowerMac 7500 runningon a 200MHz 604e.<p>It has been reported thatNTL cannot be used with Microsoft Visual C++ versions 5 or 6in ISO mode, although this compiler still works with NTL in Traditional mode.<p>I do not yet know how NTL in ISO mode works on other compilers.Feedback is always welcome.<p>As usual, NTL should continue to work in Traditional mode on just about anyavailable <tt>C++</tt> compiler.<p><center><a href="tour-modules.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a> <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> <a href="tour-unix.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a></center></body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久午夜电影网| 亚洲综合色视频| 亚洲黄色小说网站| 久久99国产精品麻豆| 色综合天天综合网天天看片| 91精品国产免费| 亚洲人成影院在线观看| 国产一区二三区好的| 欧美在线观看一区二区| 国产肉丝袜一区二区| 日本一不卡视频| 欧美性生活一区| 国产精品久久久久毛片软件| 六月丁香综合在线视频| 欧美体内she精高潮| 中文字幕亚洲区| 国产成人精品一区二| 欧美一区二区人人喊爽| 亚洲精品乱码久久久久| 成人高清在线视频| 久久久无码精品亚洲日韩按摩| 日本最新不卡在线| 欧美伊人久久大香线蕉综合69| 国产午夜精品福利| 国内精品第一页| 日韩精品一区二区三区老鸭窝| 午夜视频一区二区| 欧美色图在线观看| 亚洲福利视频三区| 欧美亚洲禁片免费| 亚洲国产毛片aaaaa无费看| 色综合久久88色综合天天6| 国产精品久久久久久久午夜片| 国产精品 日产精品 欧美精品| 欧美tickling网站挠脚心| 天堂久久久久va久久久久| 欧美放荡的少妇| 日韩电影免费在线看| 欧美一区二区三区视频在线观看 | 日本一区二区三区免费乱视频| 亚洲成人高清在线| 91精品欧美综合在线观看最新 | 麻豆91在线看| 精品国产麻豆免费人成网站| 麻豆视频观看网址久久| 亚洲精品一区二区三区四区高清 | 91美女片黄在线观看| 亚洲天堂免费看| 欧美日韩在线免费视频| 亚洲成av人片在线观看无码| 91精品国产色综合久久ai换脸| 精品一区二区三区免费毛片爱| 日韩精品一级二级| 日韩无一区二区| 国产精品资源在线观看| 国产精品传媒在线| 欧美日韩成人综合天天影院| 免费观看日韩电影| 中日韩免费视频中文字幕| 91丝袜国产在线播放| 午夜精品久久久久久久久久久| 日韩一级片网址| 成人在线视频首页| 亚洲国产欧美在线| 久久九九全国免费| 在线一区二区三区四区五区| 美女一区二区三区在线观看| 成人黄色电影在线| 成人激情av网| 欧美日本一区二区| 亚洲成人第一页| 精品视频一区二区三区免费| 亚洲欧美激情视频在线观看一区二区三区| 国产在线播精品第三| 日韩欧美国产系列| 久久国内精品自在自线400部| 欧美情侣在线播放| 人妖欧美一区二区| 精品国产髙清在线看国产毛片| 免费观看在线综合| 欧美va亚洲va| 国产乱人伦偷精品视频免下载| 精品对白一区国产伦| 国产老肥熟一区二区三区| 欧美激情一区二区在线| aaa国产一区| 亚洲午夜精品在线| 91精品欧美一区二区三区综合在 | 国产婷婷色一区二区三区| 国产综合色精品一区二区三区| xvideos.蜜桃一区二区| 国产精品123| 亚洲视频你懂的| 欧美图片一区二区三区| 免费在线观看一区二区三区| 久久五月婷婷丁香社区| 99九九99九九九视频精品| 亚洲图片有声小说| 精品国产一区二区精华| 粉嫩一区二区三区在线看| 亚洲三级小视频| 欧美精三区欧美精三区| 国产一区二区三区久久悠悠色av| 中文字幕精品—区二区四季| 欧美综合天天夜夜久久| 久久99久久久久久久久久久| 国产精品污污网站在线观看| 欧美日韩在线免费视频| 国产激情精品久久久第一区二区 | 精品三级av在线| 成人午夜电影久久影院| 亚洲一二三四在线观看| 日韩美女在线视频 | 日韩欧美电影一区| 高清国产一区二区三区| 亚洲va韩国va欧美va精品 | 99re热这里只有精品免费视频| 一区二区高清在线| 国产午夜精品福利| 欧美三级乱人伦电影| 成人在线视频一区二区| 奇米四色…亚洲| 一区二区三区加勒比av| 久久婷婷一区二区三区| 在线视频一区二区三| 国产99精品在线观看| 蜜臀av性久久久久蜜臀aⅴ| 亚洲精选视频在线| 欧美激情综合在线| 日韩午夜激情视频| 日本电影亚洲天堂一区| 国产成人免费视频网站高清观看视频 | 国产.精品.日韩.另类.中文.在线.播放 | 国产性做久久久久久| 欧美无砖专区一中文字| 国产999精品久久| 久国产精品韩国三级视频| 亚洲高清视频中文字幕| 亚洲少妇最新在线视频| 中文一区在线播放| 久久精品免费在线观看| 欧美成人精品3d动漫h| 欧美日韩国产一级| 欧美综合一区二区| 91精品91久久久中77777| av激情综合网| av在线播放不卡| 成人av第一页| 波多野结衣91| aaa国产一区| 97久久超碰国产精品电影| 成人小视频在线| 成人污污视频在线观看| 国产精品2024| 国产麻豆精品在线| 国产麻豆视频一区二区| 国产高清久久久久| 国产成人自拍网| 成人一区二区三区视频在线观看| 韩国精品免费视频| 国产成人av电影免费在线观看| 国产一区二区三区四区在线观看| 精东粉嫩av免费一区二区三区| 美女在线一区二区| 精品中文av资源站在线观看| 看国产成人h片视频| 激情五月婷婷综合| 福利91精品一区二区三区| 不卡的av电影| 欧美系列亚洲系列| 在线91免费看| 久久亚洲一区二区三区明星换脸| 久久蜜桃香蕉精品一区二区三区| 久久久国产精品午夜一区ai换脸| 亚洲国产高清在线| 综合久久久久久| 日韩av电影免费观看高清完整版 | 亚洲欧洲精品天堂一级| 亚洲免费观看高清| 亚洲国产日韩精品| 日韩avvvv在线播放| 国产高清亚洲一区| 欧美午夜片在线看| 日韩欧美国产精品一区| 国产精品日韩成人| 五月天激情小说综合| 国产乱子轮精品视频| 日本高清免费不卡视频| 日韩一卡二卡三卡| 国产精品理伦片| 日韩二区三区四区| 99麻豆久久久国产精品免费优播| 欧美日韩一区不卡| 久久久久国产精品麻豆ai换脸| 亚洲三级免费电影| 国产在线一区观看| 欧美日韩亚洲综合| 国产精品精品国产色婷婷| 蜜臀av性久久久久av蜜臀妖精| 99在线热播精品免费|