What does this mean: "error: invalid combination of multiple type-specifiers"

10,953

Solution 1

Use typedef std::make_unsigned_t< off_t > uoff_t; since C++14 instead to achieve the desired effect.

Use typedef std::make_unsigned< off_t >::type uoff_t; since C++11.

Use typedef boost::make_unsigned< off_t >::type uoff_t; before C++11.

Solution 2

Unless off_t is a macro, it's simply a syntax error.

unsigned is not something you can add to a typedef'ed type or use to modify such a type.

Cheers & hth.,

Share:
10,953
WilliamKF
Author by

WilliamKF

Updated on June 05, 2022

Comments

  • WilliamKF
    WilliamKF almost 2 years

    I'm getting a compiler error on FreeBSD:

    error: invalid combination of multiple type-specifiers
    

    From the C++ Code:

    typedef unsigned off_t uoff_t;
    

    Not sure what the gcc compiler is trying to tell me.