#include <type_traits>
template<class F, class S>
struct pair_base {
template<bool true_ = true
,typename std::enable_if
< std::is_default_constructible<F>::value
&& std::is_default_constructible<S>::value
&& true_
, int
>::type = 0
>
pair_base() : first(), second() {}
F first;
S second;
};
template<class F, class S>
struct pair : private pair_base<F,S> {
using pair_base<F,S>::first;
using pair_base<F,S>::second;
};
static_assert(std::is_default_constructible<pair<int,int>>::value, "");
static_assert(!std::is_default_constructible<pair<int&,int&>>::value, "");
int main() {}
I2luY2x1ZGUgPHR5cGVfdHJhaXRzPgoKdGVtcGxhdGU8Y2xhc3MgRiwgY2xhc3MgUz4Kc3RydWN0IHBhaXJfYmFzZSB7Cgl0ZW1wbGF0ZTxib29sIHRydWVfID0gdHJ1ZQoJICAgICAgICAsdHlwZW5hbWUgc3RkOjplbmFibGVfaWYKCSAgICAgICAgIDwgICBzdGQ6OmlzX2RlZmF1bHRfY29uc3RydWN0aWJsZTxGPjo6dmFsdWUKCSAgICAgICAgICAmJiBzdGQ6OmlzX2RlZmF1bHRfY29uc3RydWN0aWJsZTxTPjo6dmFsdWUKCSAgICAgICAgICAmJiB0cnVlXwoJICAgICAgICAgLCBpbnQKCSAgICAgICAgID46OnR5cGUgPSAwCgkgICAgICAgID4KCXBhaXJfYmFzZSgpIDogZmlyc3QoKSwgc2Vjb25kKCkge30KCUYgZmlyc3Q7CglTIHNlY29uZDsKfTsKCnRlbXBsYXRlPGNsYXNzIEYsIGNsYXNzIFM+CnN0cnVjdCBwYWlyIDogcHJpdmF0ZSBwYWlyX2Jhc2U8RixTPiB7Cgl1c2luZyBwYWlyX2Jhc2U8RixTPjo6Zmlyc3Q7Cgl1c2luZyBwYWlyX2Jhc2U8RixTPjo6c2Vjb25kOwp9OwoKc3RhdGljX2Fzc2VydChzdGQ6OmlzX2RlZmF1bHRfY29uc3RydWN0aWJsZTxwYWlyPGludCxpbnQ+Pjo6dmFsdWUsICIiKTsKc3RhdGljX2Fzc2VydCghc3RkOjppc19kZWZhdWx0X2NvbnN0cnVjdGlibGU8cGFpcjxpbnQmLGludCY+Pjo6dmFsdWUsICIiKTsKCmludCBtYWluKCkge30K