GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — boost\network\uri\uri.hpp(336,40): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data · Issue #896 · cpp-netlib/cpp-netlib

boost\network\uri\uri.hpp(336,40): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data #896

New issue
Copy link
New issue
Copy link
Open
Open
boost\network\uri\uri.hpp(336,40): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data#896
Copy link
Assignees
glynos

Description

@BullyWiiPlaza
BullyWiiPlaza
opened on Nov 6, 2021
Issue body actions

Hi, I'm using vcpkg and when I include cpp-netlib in my codebase, I always get the following compilation warning:

C:\vcpkg\installed\x64-windows-static\include\boost\network\uri\uri.hpp(336,40): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data (compiling source file main.cpp)

This would easily be fixed by adding a respective cast in this library:

inline bool operator==(const uri &lhs, const uri::value_type *rhs) {
  auto rlen = std::strlen(rhs);
  size_t llen = std::labs((long) std::distance(lhs.begin(), lhs.end())); // <---
  if (rlen != llen) return false;
  return boost::equal(lhs, boost::make_iterator_range(rhs, rhs + rlen));
}

Activity

  1. BullyWiiPlaza commented on Feb 26, 2022

    @BullyWiiPlaza
    BullyWiiPlaza
    on Feb 26, 2022
    Author
    More actions

    Is this issue getting noticed at all?
    It's still not resolved in Boost version 1.78.0 and it would be so simple...

  2. glynos
    self-assigned this
    on Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @glynos
    glynos

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

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.