 
            
            
            
            
                29 Sep
                
                    2017
                
            
            
                29 Sep
                
                '17
                
            
            
            
        
    
                2:05 a.m.
            
        Why... what changed in C++1z that makes the above compile? How can I prevent copying x outside its friend function f in C++1z?
C++ 17 guarantees copy elision in the strong sense. Note it still can't be copied, but it can be initialised now. So disable non-friend construction to fix. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/