add debug assertion for typeid on gcc