Testing the Syntax High-Lighter

Just installed the WP-Syntax plugin. Let’s see how it works…

 
template <bool Expr>
struct StaticAssert
{
    enum {value = Expr};
};
 
template <>
struct StaticAssert<true>
{
    enum {value = true};
};
 
1
2
3
4
5
6
7
8
9
10
11
12
// Line numbers!
template <bool Expr>
struct StaticAssert
{
    enum {value = Expr};
};
 
template <>
struct StaticAssert<true>
{
    enum {value = true};
};

For future reference, I used the following HTML to put code in a post or comment. You can (and are encouraged to) too!

<pre lang="cpp|html|python|..." line="0|1">
</pre>

Or more aesthetically pleasing:

<pre lang="cpp|html|python|..." line="0|1">
&lt;/pre> <!-- The replace the "&lt;" here with "<". Do you know a way to put a "pre" closing tag inside a "pre"? -->

The supported language names are:
abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

Printer-friendly version Printer-friendly version