fork(1) download
  1. #include <iostream>
  2. #include <memory>
  3. using namespace std;
  4.  
  5. class Data {
  6. public:
  7. static constexpr int VAL{0xFF};
  8. };
  9.  
  10. constexpr int Data::VAL;
  11.  
  12. int main() {
  13. auto ok{std::make_shared<int>(int(Data::VAL))}; // This compiles correct
  14. auto dontCompile{std::make_shared<int>(Data::VAL)}; // This now also compiles
  15. }
  16.  
Success #stdin #stdout 0s 4380KB
stdin
Standard input is empty
stdout
Standard output is empty