本の虫: 今まで知らなかったswitch文の仕様 http://cpplover.blogspot.com/2010/07/switch.html
-----
これは酷い。
-----
void f( int const value )
{
int i = 0 ;
switch( value )
for ( ; i != 10 ; ++i )
{
case 1 : case 2 :
std::cout << "value is 1 or 2" << std::endl ;
continue ;
void f( int const value ){
std::cout << value << std::endl;
int i = 0;
switch(value){
for(; i < 3; ++i){
case 0: std::cout << "test" << std::endl;
case 1: std::cout << "google" << std::endl;
}
break;
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
["DOM functions can be deleted", function () { delete Node.prototype.appendChild; var retVal = !document.appendChild; /* Restore for next iteration */Node.prototype.appendChild = backupAppendChildFunc; return retVal; } ],
あ。
これは駄目だった。
-----
["Cached DOM functions require a 'this' object", function () { var g = document.getElementById; try { var res = g("demobody"); return false; /* this-less invoke should be illegal */ } catch (ex) { } return true; } ],
// New ECMAScript 5 capabilities
["ES5 direct-prototype-access", function () { return Object.getPrototypeOf(document.createElement('div')) == HTMLDivElement.prototype; } ],
["DOM objects can be 'locked' with ES5 preventExtensions", function () { var d = document.createElement('div'); Object.preventExtensions(d); d.extensionVal = "test"; return (d.extensionVal != "test"); } ],
["DOM properties (ES5 accessors) created on appropriate prototypes", function () { return Node.prototype.hasOwnProperty("nodeName"); } ],
["'Get' function of accessor properties can be executed", function () { return document.nodeName == "#document"; } ],
["'Set' function of accessor property can be executed", function () { document.body.lastChild.data = ""; return document.body.lastChild.data == ""; } ],
["DOM accessors can be deleted", function () { delete Element.prototype.tagName; var retVal = document.body.tagName === undefined; /* Restore for next iteration */Object.defineProperty(Element.prototype, "tagName", backupTagNamePropDesc); return retVal; } ],
John Resig - ECMAScript 5 Strict Mode, JSON, and More http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
---
>Additionally, attempts to introduce new variables through an eval will be blocked.
-----
amachangの高速化の手法が使えなくなるね。
-----
var _d = document;
eval("var document = _d;");
-----
のパターンの奴。まあ、strict modeを使わなければいいだけの話だが。
>Access to arguments.caller and arguments.callee now throw an exception. Thus any anonymous functions that you want to reference will need to be named, like so:
な、なんだって!