CesiumGS / CesiumGS/cesium-native

Functions are declared noexcept, even though they may throw

Open
#348 0 comments 0 reactions 0 assignees View on GitHub
bug quality
Dominant language
C++
Stars
623
Forks
277
PR merge metrics
No merged PRs in 30d

Description

This issue is a special instance of https://github.com/CesiumGS/cesium-native/issues/30 , and refers to warnings

> Warning C26447 The function is declared 'noexcept' but calls function ... which may throw exceptions (f.6).

I think that these are somewhat "critical", because throwing from a `noexcept` will trigger an `std::terminate()`, and this is... usually not desired.

There are currently 118 functions that have this problem, which I'll just dump here, to give an overview:

```
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 14
Warning C26447 The function is declared 'noexcept' but calls function 'mix()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumUtility\include\CesiumUtility\Math.h 329
Warning C26447 The function is declared 'noexcept' but calls function 'operator "" s()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tile.cpp 35
Warning C26447 The function is declared 'noexcept' but calls function 'all_of > >, >()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tile.cpp 110
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayTileProvider.cpp 34
Warning C26447 The function is declared 'noexcept' but calls function 'Tile & __ptr64)><,0>()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayCollection.cpp 66
Warning C26447 The function is declared 'noexcept' but calls function 'forEachLoadedTile()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayCollection.cpp 54
Warning C26447 The function is declared 'noexcept' but calls function 'find_if > > > >, >()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayCollection.cpp 68
Warning C26447 The function is declared 'noexcept' but calls function 'operator==()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayCollection.cpp 74
Warning C26447 The function is declared 'noexcept' but calls function 'operator*()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\RasterOverlayCollection.cpp 81
Warning C26447 The function is declared 'noexcept' but calls function 'computeApproximateConversionFactorToMetersNearPosition()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\QuadtreeRasterOverlayTileProvider.cpp 252
Warning C26447 The function is declared 'noexcept' but calls function 'log2()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\QuadtreeRasterOverlayTileProvider.cpp 262
Warning C26447 The function is declared 'noexcept' but calls function 'dispatchMainThreadTasks()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tileset.cpp 126
Warning C26447 The function is declared 'noexcept' but calls function 'dispatchMainThreadTasks()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tileset.cpp 133
Warning C26447 The function is declared 'noexcept' but calls function 'operator++()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tileset.cpp 136
Warning C26447 The function is declared 'noexcept' but calls function 'operator++()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\Tileset.cpp 493
Warning C26447 The function is declared 'noexcept' but calls function 'dot<2,double,0>()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\TileUtilities.cpp 91
Warning C26447 The function is declared 'noexcept' but calls function 'dot<2,double,0>()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\TileUtilities.cpp 92
Warning C26447 The function is declared 'noexcept' but calls function 'dot<2,double,0>()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\TileUtilities.cpp 93
Warning C26447 The function is declared 'noexcept' but calls function 'operator*()' which may throw exceptions (f.6). Cesium3DTilesSelection C:\Dev\cesium-native\Cesium3DTilesSelection\src\TileUtilities.cpp 128
Warning C26447 The function is declared 'noexcept' but calls function 'make_shared const & __ptr64>()' which may throw exceptions (f.6). CesiumAsync C:\Dev\cesium-native\CesiumAsync\src\AsyncSystem.cpp 9
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 44
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 45
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 47
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 50
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 55
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 56
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 58
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 61
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 66
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 67
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 69
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 72
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 79
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 80
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 81
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 85
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 86
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 87
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 91
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 92
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 93
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 97
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 98
Warning C26447 The function is declared 'noexcept' but calls function 'emplace_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\clipTriangleAtAxisAlignedThreshold.cpp 99
Warning C26447 The function is declared 'noexcept' but calls function 'length<2,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\Rectangle.cpp 39
Warning C26447 The function is declared 'noexcept' but calls function 'Ray()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\Ray.cpp 20
Warning C26447 The function is declared 'noexcept' but calls function 'QuadtreeNode> > > >()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 12
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 21
Warning C26447 The function is declared 'noexcept' but calls function 'push_back()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 101
Warning C26447 The function is declared 'noexcept' but calls function 'push_heap > >,bool (__cdecl*)(CesiumGeometry::QuadtreeTileAvailability::RectangleWithLevel const & __ptr64,CesiumGeometry::QuadtreeTileAvailability::RectangleWithLevel const & __ptr64) noexcept>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 104
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 204
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 210
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 216
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\QuadtreeTileAvailability.cpp 222
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\Plane.cpp 23
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 34
Warning C26447 The function is declared 'noexcept' but calls function 'length<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 56
Warning C26447 The function is declared 'noexcept' but calls function 'length<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 57
Warning C26447 The function is declared 'noexcept' but calls function 'length<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 58
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 67
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 66
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\OrientedBoundingBox.cpp 65
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\IntersectionTests.cpp 13
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\IntersectionTests.cpp 21
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 25
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 34
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 35
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 36
Warning C26447 The function is declared 'noexcept' but calls function 'Plane()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 38
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 44
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 45
Warning C26447 The function is declared 'noexcept' but calls function 'Plane()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 47
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 53
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 54
Warning C26447 The function is declared 'noexcept' but calls function 'Plane()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 56
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 62
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 63
Warning C26447 The function is declared 'noexcept' but calls function 'Plane()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\CullingVolume.cpp 65
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\BoundingSphere.cpp 10
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeometry C:\Dev\cesium-native\CesiumGeometry\src\BoundingSphere.cpp 28
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Transforms.cpp 33
Warning C26447 The function is declared 'noexcept' but calls function 'cross()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Transforms.cpp 34
Warning C26447 The function is declared 'noexcept' but calls function 'Ray()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\EllipsoidTangentPlane.cpp 31
Warning C26447 The function is declared 'noexcept' but calls function 'operator= const & __ptr64,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\EllipsoidTangentPlane.cpp 38
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\EllipsoidTangentPlane.cpp 43
Warning C26447 The function is declared 'noexcept' but calls function 'normalize<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 23
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 33
Warning C26447 The function is declared 'noexcept' but calls function 'atan()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 50
Warning C26447 The function is declared 'noexcept' but calls function 'length<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 52
Warning C26447 The function is declared 'noexcept' but calls function 'length<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\Ellipsoid.cpp 97
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 175
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 177
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 182
Warning C26447 The function is declared 'noexcept' but calls function 'dot<3,double,0>()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 184
Warning C26447 The function is declared 'noexcept' but calls function 'BoundingRegion()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 220
Warning C26447 The function is declared 'noexcept' but calls function 'operator[]()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 252
Warning C26447 The function is declared 'noexcept' but calls function 'operator[]()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 251
Warning C26447 The function is declared 'noexcept' but calls function 'operator[]()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 250
Warning C26447 The function is declared 'noexcept' but calls function 'operator*()' which may throw exceptions (f.6). CesiumGeospatial C:\Dev\cesium-native\CesiumGeospatial\src\BoundingRegion.cpp 255
Warning C26447 The function is declared 'noexcept' but calls function 'find()' which may throw exceptions (f.6). CesiumGltfReader C:\Dev\cesium-native\CesiumGltf\include\CesiumGltf\ExtensibleObject.h 23
Warning C26447 The function is declared 'noexcept' but calls function 'operator==()' which may throw exceptions (f.6). CesiumGltfReader C:\Dev\cesium-native\CesiumGltf\include\CesiumGltf\ExtensibleObject.h 24
Warning C26447 The function is declared 'noexcept' but calls function 'operator->()' which may throw exceptions (f.6). CesiumGltfReader C:\Dev\cesium-native\CesiumGltf\include\CesiumGltf\ExtensibleObject.h 28
Warning C26447 The function is declared 'noexcept' but calls function 'find()' which may throw exceptions (f.6). CesiumGltf C:\Dev\cesium-native\CesiumGltf\src\ExtensibleObject.cpp 14
Warning C26447 The function is declared 'noexcept' but calls function 'operator==()' which may throw exceptions (f.6). CesiumGltf C:\Dev\cesium-native\CesiumGltf\src\ExtensibleObject.cpp 15
Warning C26447 The function is declared 'noexcept' but calls function 'operator->()' which may throw exceptions (f.6). CesiumGltf C:\Dev\cesium-native\CesiumGltf\src\ExtensibleObject.cpp 19
Warning C26447 The function is declared 'noexcept' but calls function 'allocator >()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\ImageWriter.cpp 16
Warning C26447 The function is declared 'noexcept' but calls function 'allocator >()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\ImageWriter.cpp 14
Warning C26447 The function is declared 'noexcept' but calls function 'allocator >()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\ImageWriter.cpp 25
Warning C26447 The function is declared 'noexcept' but calls function 'allocator >()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\ImageWriter.cpp 23
Warning C26447 The function is declared 'noexcept' but calls function 'allocator >()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\EncodeBase64String.cpp 7
Warning C26447 The function is declared 'noexcept' but calls function 'resize()' which may throw exceptions (f.6). CesiumGltfWriter C:\Dev\cesium-native\CesiumGltfWriter\src\EncodeBase64String.cpp 11
Warning C26447 The function is declared 'noexcept' but calls function 'CrtAllocator,0>()' which may throw exceptions (f.6). CesiumJsonWriter C:\Dev\cesium-native\CesiumJsonWriter\src\PrettyJsonWriter.cpp 9
Warning C26447 The function is declared 'noexcept' but calls function 'SetFormatOptions()' which may throw exceptions (f.6). CesiumJsonWriter C:\Dev\cesium-native\CesiumJsonWriter\src\PrettyJsonWriter.cpp 10
Warning C26447 The function is declared 'noexcept' but calls function 'make_unique,rapidjson::CrtAllocator>,rapidjson::UTF8,rapidjson::UTF8,rapidjson::CrtAllocator,0>,rapidjson::PrettyWriter,rapidjson::CrtAllocator>,rapidjson::UTF8,rapidjson::UTF8,rapidjson::CrtAllocator,0>,0>()' which may throw exceptions (f.6). CesiumJsonWriter C:\Dev\cesium-native\CesiumJsonWriter\src\PrettyJsonWriter.cpp 12
Warning C26447 The function is declared 'noexcept' but calls function 'find()' which may throw exceptions (f.6). CesiumUtility C:\Dev\cesium-native\CesiumUtility\src\ExtensibleObject.cpp 13
Warning C26447 The function is declared 'noexcept' but calls function 'operator==()' which may throw exceptions (f.6). CesiumUtility C:\Dev\cesium-native\CesiumUtility\src\ExtensibleObject.cpp 14
Warning C26447 The function is declared 'noexcept' but calls function 'operator->()' which may throw exceptions (f.6). CesiumUtility C:\Dev\cesium-native\CesiumUtility\src\ExtensibleObject.cpp 18
```

(Yes, they are made "unique" with a custom program that processes the otherwise rather useless VS build output....)

Most of them are from three and a half categories:

### Related to `glm`:

Most of these are related to `glm` functions. Unfortunately, the exception specifications for GLM are remarkably unclear (c.f. https://github.com/g-truc/glm/pull/402#issuecomment-192752801 ). The documentation hardly says anything (except for vague hints, e.g. that [`normalize` may "crash" for zero length vectors](https://github.com/g-truc/glm/blob/master/manual.md#-710-why-some-glm-functions-can-crash-because-of-division-by-zero). Trying to dive into the actual code leads into nested template magic, and even though it *looks* like things like `normalize` only use `std::sqrt` internally (which is `noexcept`), it's hard to say for sure whether this is true in all cases and on all platforms.

### Related to basic operators like `==`

This appears in cases where some templated function does trivial things like

auto it = someVector.find(whatever);
if (it == someVector.end()) { // The "dangerous" == appears here...

### Related to allocations

This happens for cases where a `make_unique`, `make_shared`, or `v.emplace_back` is called, but also for the "allocation" of apparent `"string constants"`. (The latter could probably be solved with some statics or `constexpr` here and there...)

### Others

There are some calls like `find_if`, `all_of`, or other STL functions that *may* throw

---

The options for addressing these certainly range from"Ignore it" to "Wrap it into a `try...catch`, and return some `optional` where appropriate", but I wonder whether there is any general preference, maybe roughly divided by the categories that I mentioned.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.