[nvcc bug report] in-class member initializers

nvcc release V9.0.176 has problems to parse in-class member initializers.

following code breaks with error :
error: »tp_std« was not declared
std::chrono::steady_clock::time_point tp_{ (std::chrono::steady_clock::time_point::max)() };

#include <chrono>

struct foo {
    std::chrono::steady_clock::time_point tp_{ (std::chrono::steady_clock::time_point::max)() };
};
                
int main() { 
    return 0;
}

While the code compiles with a small change:

#include <chrono>

std::chrono::steady_clock::time_point bar() {
    return (std::chrono::steady_clock::time_point::max)();
}

struct foo {
    std::chrono::steady_clock::time_point tp_{ bar() };
};

int main() {
    return 0;
}

If you would like to file a bug report with NVIDIA, please use the bug reporting form linked from the registered developer website. These forums are a platform where users help users, they are not an official NVIDIA bug reporting channel. On occasion an issue reported in the forums may catch the attention of a relevant NVIDIA employee who happens to be present, but in general that is not a safe assumption.

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /system/ajax
StatusText: Forbidden
ResponseText:
403 - Forbidden
403 - Forbidden

not what I would expect from a bug reporting system :(

NVIDAs bug reporting system quits with 403 if following code gets inserted:

std::chrono::steady_clock::time_point bar() {
    return (std::chrono::steady_clock::time_point::max)();
}

strange …

NVIDIA’s bug reporting system has a detector for “malicious” content, and when the detector triggers it results in the kind of obscure error you encountered. Unfortunately, the detector is prone to false positives. That is a problem that has existed for half a dozen years by now …

The strategy I recommend is to file a minimal bug report, pointing out that supporting files will be added later. Then add files with source code etc one by one. I know, annoying.

Thanks for making an effort to file a bug report. Apologies for the difficulty. Just agreeing here with what njuffa said. Also, if you want to file a bug report with almost no information, and give me the bug number returned to you by the system, I will clean up and update the report with the information you have given here.

Thank you - would be nice if you could clean-up the bug report: bug ID 2015848

“cleaned up”

You won’t see any changes in your view of the bug, but it has been assigned to a suitable starting point in our system, and I have added the reproducer code here as well as instructions for repro.