Skip to content

Commit 7bfe100

Browse files
Declare noexcept default constructors to fix -Wnoexcept errors with GCC 11
1 parent e4c11bd commit 7bfe100

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

vpr/src/place/net_cost_handler.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ class NetCostHandler {
238238
/// and must be used as the reference for later pins of the same net.
239239
/// GOT_FROM_SCRATCH: the proposed bounding box was recomputed from scratch and is final.
240240
NetUpdateState update_status = NetUpdateState::NOT_UPDATED_YET;
241+
242+
/// Declared noexcept explicitly because older libstdc++ does not mark
243+
/// the std::pair default constructor noexcept, which causes a -Wnoexcept warning.
244+
t_ts_net_info() noexcept = default;
241245
};
242246

243247
/**
@@ -252,6 +256,10 @@ class NetCostHandler {
252256
std::pair<float, float> avg_chan_util = {0.f, 0.f};
253257
/// Congestion cost of the net
254258
double cost = -1.;
259+
260+
/// Declared noexcept explicitly because older libstdc++ does not mark
261+
/// the std::pair default constructor noexcept, which causes a -Wnoexcept warning.
262+
t_net_cong_info() noexcept = default;
255263
};
256264

257265
/// Slot value meaning that a net is not affected by the current move.

0 commit comments

Comments
 (0)