explicit type of derived_unit leads to compilation error #712
              
                
                  
                  
                    Answered
                  
                  by
                    mpusz
                  
              
          
                  
                    
                      mathisloge
                    
                  
                
                  asked this question in
                Q&A
              
            -
| Following the tutorial in https://mpusz.github.io/mp-units/latest/users_guide/framework_basics/design_overview/?h=derived_unit#unit leads to an compilation error. How do you currently define a derived value type? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mpusz
          
      
      
        Aug 2, 2025 
      
    
    Replies: 1 comment
-
| Users should never instantiate  constexpr auto x = mp_units::si::metre / mp_units::per<mp_units::si::second>;A similar example can be found in https://mpusz.github.io/mp-units/latest/getting_started/quick_start/#__tabbed_5_3 of our docs. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        mathisloge
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Users should never instantiate
derived_XXXtypes by themselves. Just use regular arithmetic. For example:A similar example can be found in https://mpusz.github.io/mp-units/latest/getting_started/quick_start/#__tabbed_5_3 of our docs.