A bag of numbers in C++ for constant time statistics queries
Since the code is not doing a rocket science, I'll only mention subtle things that slipped through.

Non-associative math:

Floating point math is very dangerous to deal with. This is especially true when optimizations are all high (I actually had to observe it myself). So, the expression:

m_sum * m_sum / m_size;


has chances to produce different results on different optimization levels. It is better to put parentheses:

(m_sum * m_sum) / m_size;


Calling non explicit constructor:

    m_size = 0;
    m_sum = 0;
    m_square_sum = 0;


Those statements might not compile if the constructor of Num is explicit. I think sometimes it is reasonable to make it explicit. Instead, directly call the constructor with the 0 in it:

    m_size = Num(0);
    //ditto


Non-portable code:

return sqrt(var());


Unqualified call assumes that sqrt() is present in the current namespace. It is not always so, since cmath guarantees only functions being available in std namespace.

Unnecessary include:

&lt;cstdlib&gt; looks useless here. &lt;cstddef&gt; should be used instead for std::size_t.

cosmetics:

Num is too generic. FloatingPoint would do better, though the class can use fixed point as well. If I would know word for combination of both, I would put it instead of Num. It will tell more about the type.

Indentations inside of namespaces is weird for me.

Design:

May be it would be possible to write something like in a python:

bag - num(12);


so it would remove the number from bag. The current design seems slightly verbose.

ADL:

As mentioned in the comment, it is good to put the operator inside of the namespace in which the class appears, and in namespaces that inlined into namespace that declares the class. It will trigger argument dependent lookup, the reason why using std::swap; swap(a, b); works.