Maybe you could add concept checking BOOST_CONCEPT_ASSERT ... on CInteger and CNumber (please check if the concepts are correct)