Boost logo

Boost :

From: Martin Bosticky (MBosticky_at_[hidden])
Date: 2002-06-05 18:12:12


I get following error when compiling the regex example
regex_grep_example_3.cpp in VC6.

error C2784: 'class std::mem_fun_t<_R,_Ty> __cdecl std::mem_fun(_R
(__thiscall _Ty::*)(void))' : could not deduce template argument for
'<Unknown>' from 'bool (__thiscall class_index::*)(class boost::ma
tch_results<char const *,class boost::detail::allocator_adapter<char,class
boost::detail::simple_alloc> >)'

is this expected? according to the page of the tested compilers VC6 should
pass.

-----Original Message-----
From: Dan Gohman [mailto:gohmandj_at_[hidden]]
Sent: Thursday, 6 June 2002 4:10
To: boost_at_[hidden]
Subject: [boost] LP64 warnings in Boost.Format

Other than a few small issues, the format library is working great for me.

First, in the Boost top-level index.htm:

  <a href="file:///C:/boost/site/libs/format/index.htm">Format Library</a>

Second, there are some issues with LP64 platforms. One one of the
platforms I'm using right now, pointers, longs, and unsigned longs
are 64-bit types. Additionally, size_t, ptrdiff_t, and streamsize
are typedefed to 64-bit types.

Here are the (reformatted) warnings that I'm currently seeing from the
format library. Some of these look like they can be fixed by using
std::streamsize instead of int.

File = boost/format/format_implementation.hpp, Line = 191
  There is an implicit conversion from "unsigned long" to "int"; rounding,
sign
          extension, or loss of accuracy may result.

        int n=item.state_.width_ - res.size();
              ^
File = boost/format/internals.hpp, Line = 121
  There is an implicit conversion from "long" to "int"; rounding, sign
          extension, or loss of accuracy may result.

        width_ = os.width();
                 ^
File = boost/format/internals.hpp, Line = 122
  There is an implicit conversion from "long" to "int"; rounding, sign
          extension, or loss of accuracy may result.

        precision_ = os.precision();
                     ^
File = boost/format/parsing.hpp, Line = 134
  There is an implicit conversion from "unsigned long" to "unsigned int";
          rounding, sign extension, or loss of accuracy may result.

          int n=str2int(buf,i0, os);
                            ^
File = boost/format/parsing.hpp, Line = 210
  There is an implicit conversion from "unsigned long" to "unsigned int";
          rounding, sign extension, or loss of accuracy may result.

        { fpar->ref_state_.width_ = str2int(buf,i0, os); }
                                                ^
File = boost/format/parsing.hpp, Line = 229
  There is an implicit conversion from "unsigned long" to "unsigned int";
          rounding, sign extension, or loss of accuracy may result.

            fpar->ref_state_.precision_ = str2int(buf,i0, os);
                                                      ^
File = boost/format/feed_args.hpp, Line = 140
  There is an implicit conversion from "long" to "int"; rounding, sign
          extension, or loss of accuracy may result.

      const int w=oss_.width();
                  ^
File = boost/format/feed_args.hpp, Line = 48
  There is an implicit conversion from "unsigned long" to "int"; rounding,
sign
          extension, or loss of accuracy may result.

      int n=w-s.size();
            ^

Dan

-- 
Dan Gohman
gohmandj_at_[hidden]
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk