SlickEdit Product Discussion > SlickEdit®

std::string::size() evaluated type is incorrect


See attached screenshot and code sample.

The evaluated type for "std::string::size()" should end with ::size_type, what is evaluated seems incorrect.

Or, when I use a different code browsing tool, cquery, it tells me that the evaluated type of "helloSize" is "unsigned long".

--- Code: ---#include <iostream>
#include <string>

int main()
    std::string hello("Hello");
    std::string world("world");
    auto helloSize = hello.size();
    auto worldSize = world.size();
    auto minSize = std::min(helloSize, worldSize);
    std::cout << "minSize = " << minSize << " \n";
    return 0;
--- End code ---

I will look into this.

This should be fixed in the next hot fix for 23.0.1.  I had to implement template function template parameter type inference in order to get this going (on account of std::min).

Thanks Dennis! Really appreciate it!


[0] Message Index

Go to full version