Skip to content

compile error  #2

@gvsurenderreddy

Description

@gvsurenderreddy

g++ -lz -o unscrew unscrew.cpp
unscrew.cpp: In function ‘T swap_endian(T)’:
unscrew.cpp:23: error: there are no arguments to ‘static_assert’ that depend on a template parameter, so a declaration of ‘static_assert’ must be available
unscrew.cpp:23: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
unscrew.cpp: In function ‘T swap_endian(T) [with T = short int]’:
unscrew.cpp:159: instantiated from here
unscrew.cpp:23: error: ‘static_assert’ was not declared in this scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions