Skip to content

error: ‘numeric_limits’ is not a member of ‘std’ #148

Description

@echometerain
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:304:36: error: ‘numeric_limits’ is not a member of ‘std’
  304 |                 case 1: ma = (std::numeric_limits<unsigned char>::max)();
      |                                    ^~~~~~~~~~~~~~
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:304:51: error: expected primary-expression before ‘unsigned’
  304 |                 case 1: ma = (std::numeric_limits<unsigned char>::max)();
      |                                                   ^~~~~~~~
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:304:51: error: expected ‘)’ before ‘unsigned’
  304 |                 case 1: ma = (std::numeric_limits<unsigned char>::max)();
      |                              ~                    ^~~~~~~~
      |                                                   )
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:306:36: error: ‘numeric_limits’ is not a member of ‘std’
  306 |                 case 2: ma = (std::numeric_limits<unsigned short>::max)();
      |                                    ^~~~~~~~~~~~~~
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:306:51: error: expected primary-expression before ‘unsigned’
  306 |                 case 2: ma = (std::numeric_limits<unsigned short>::max)();
      |                                                   ^~~~~~~~
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:306:51: error: expected ‘)’ before ‘unsigned’
  306 |                 case 2: ma = (std::numeric_limits<unsigned short>::max)();
      |                              ~                    ^~~~~~~~
      |                                                   )
sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp:383:33: warning: format not a string literal and no format arguments [-Wformat-security]
  383 |                         fl_alert( err.c_str() );
      |                         ~~~~~~~~^~~~~~~~~~~~~~~
make[1]: *** [Makefile:2792: sources/libcpp83gts_callback_and_action/libgts_la-fl_gl_image_view.lo] Error 1

Fails on Ubuntu Impish unless #include <limits> is added to /sources/libcpp83gts_callback_and_action/fl_gl_image_view.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions