You are taking quiz After 0 of 10 questions, you have 0.00 points.

Question #233 Difficulty: 2

According to the C++17 standard, what is the output of this program?

    #include <type_traits>
#include <iostream>

using namespace std;

struct X {
    int f() const&&{
        return 0;

int main() {
    auto ptr = &X::f;
    cout << is_same_v<decltype(ptr), int()>
         << is_same_v<decltype(ptr), int(X::*)()>;


Can you overload two otherwise identical functions based on their ref qualifier alone?


Mode : Quiz

If you want to quit the current quiz and go back to training mode, click here.