propagate_const and forward declaration
Instantiating a standard library template with an incomplete type is generally prohibited.
std::map
is not an exception to that rule.Querying
decltype(*std::declval<_Tp&>())
with_Tp = std::unique_ptr<std::map<int, FWD>>
necessitates the instantiation of all associated classes of_Tp
to look for potential friendoperator*
declarations.Among those associated classes is
std::map<int, FWD>
.Instantiation of
std::map<int, FWD>
invokes undefined behavior.