Boost C++ Libraries: Ticket #12050: error C2668: 'boost::begin' : ambiguous call to overloaded function https://svn.boost.org/trac10/ticket/12050 <p> Dear team, </p> <p> Could you please help me to get rid of the below mentioned error/warnings. 1.error C2668: 'boost::begin' : ambiguous call to overloaded function 2.error C2668: 'boost::end' : ambiguous call to overloaded function 3.error C2780: '_OutTy *std::transform(_InIt1,_InIt1,_InTy (&amp;)[_InSize],_OutTy (&amp;)[_OutSize],_Fn2)' : expects 5 arguments - 4 provided 4.error C2780: '_OutTy *std::transform(_InIt1,_InIt1,_InIt2,_OutTy (&amp;)[_OutSize],_Fn2)' : expects 5 arguments - 4 provided 5.error C2780: '_OutIt std::transform(_InIt1,_InIt1,_InTy (&amp;)[_InSize],_OutIt,_Fn2)' : expects 5 arguments - 4 provided 6.error C2780: '_OutIt std::transform(_InIt1,_InIt1,_InIt2,_OutIt,_Fn2)' : expects 5 arguments - 4 provided 7.warning C4244: 'argument' : conversion from '<span class="underline">int64' to 'int', possible loss of data </span></p> <p> I am using boost_1_34_1(as it required for project need) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12050 Trac 1.4.3 John Maddock Sat, 12 Mar 2016 18:38:25 GMT <link>https://svn.boost.org/trac10/ticket/12050#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:1</guid> <description> <p> You need to specify what code causes the errors and which boost library you are using. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 14 Mar 2016 09:08:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/12050#comment:1" title="Comment 1">johnmaddock</a>: </p> <blockquote class="citation"> <p> You need to specify what code causes the errors and which boost library you are using. </p> </blockquote> <p> This is one of the piece of code:- </p> <p> Library: 1.34.1 1. </p> <blockquote> <p> template&lt;typename WritableRangeT&gt; </p> <blockquote> <p> inline void to_lower( </p> <blockquote> <p> WritableRangeT&amp; Input, const std::locale&amp; Loc=std::locale()) </p> </blockquote> <p> { </p> <blockquote> <p> std::transform( </p> <blockquote> <p> begin(Input), end(Input), begin(Input), ::boost::algorithm::detail::to_lowerF&lt; </p> <blockquote> <p> typename range_value&lt;WritableRangeT&gt;::type &gt;(Loc)); </p> </blockquote> </blockquote> </blockquote> <p> } </p> </blockquote> </blockquote> <p> 2. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 14 Mar 2016 09:40:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/12050#comment:2" title="Comment 2">anonymous</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/12050#comment:1" title="Comment 1">johnmaddock</a>: </p> <blockquote class="citation"> <p> You need to specify what code causes the errors and which boost library you are using. </p> </blockquote> <p> This is one of the piece of code:- </p> <p> Library: 1.34.1 1. </p> <blockquote> <p> template&lt;typename WritableRangeT&gt; </p> <blockquote> <p> inline void to_lower( </p> <blockquote> <p> WritableRangeT&amp; Input, const std::locale&amp; Loc=std::locale()) </p> </blockquote> <p> { </p> <blockquote> <p> std::transform( </p> <blockquote> <p> begin(Input), end(Input), begin(Input), ::boost::algorithm::detail::to_lowerF&lt; </p> <blockquote> <p> typename range_value&lt;WritableRangeT&gt;::type &gt;(Loc)); </p> </blockquote> </blockquote> </blockquote> <p> } </p> </blockquote> </blockquote> <p> 2. </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 14 Mar 2016 12:08:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:4</guid> <description> <p> Boost-1.34 is ancient, I doubt you'll get much help there. </p> <p> And the code you posted still doesn't provide something we can reproduce with (ie a self contained test case), or indicate which boost library is causing the issue for you. </p> </description> <category>Ticket</category> </item> <item> <author>greatsaurav@…</author> <pubDate>Mon, 14 Mar 2016 12:51:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:5</guid> <description> <p> The code shows error in case_conv.hpp. And I had pasted the piece of code too(above ). Our project requirement is to use Boost-1.34 only. So I am using it. </p> <p> I am not able to understand that what info you want from me to get rid of this issue. </p> <p> Note:- I had done copied boost 1_34_1 to "c:\Program Files (x86)\boost\" folder. </p> <p> Do we have to do something else to use full fledged boost library ? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Mon, 14 Mar 2016 15:05:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:6</guid> <description> <blockquote class="citation"> <p> I am not able to understand that what info you want from me to get rid of this issue. </p> </blockquote> <p> ADL depends on the type of arguments, but that info is missing in this ticket. So we cannot reproduce the error. Also note that, since some compilers have bugs, it is helpful for developers to know what compiler (and which version) is used. </p> <p> Unfortunately, Boost 1.34 is too old so you may get only a little help (even if you provide enough info) as John said. But anyway, here's a possible fix: </p> <blockquote> <p> <code>boost::begin</code> (<code>end</code>) itself is not a customization point, so don't use it as an unqualifed call (i.e. <code>begin(Input)</code>); if you intend to use <code>boost::begin</code>, qualify <code>begin</code> with <code>boost::</code> (i.e. <code>boost::begin(Input)</code>). </p> </blockquote> <blockquote> <p> See the bottom of <a href="http://www.boost.org/libs/range/doc/html/range/reference/concept_implementation/semantics/functions.html">this page</a>. </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 15 Mar 2016 08:38:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:7</guid> <description> <p> I am using Microsoft Visual Studio Professional 2012. Version 11.0.50727.1 RTMREL </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 16 Mar 2016 11:24:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:8</guid> <description> <p> Could you please suggest some good IDE/Compiler where we can execute the code. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Wed, 16 Mar 2016 13:19:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:9</guid> <description> <p> My guess is that the problem is caused by the ambiguity between <code>boost::begin</code> and <code>std::begin</code>. If that's the case, then a solution would be </p> <ol class="upperalpha"><li>Use more recent versions of Boost. </li><li>Add <code>boost::</code> before <code>begin</code> (and <code>end</code>). </li><li>Use compilers (stdlibs) without <code>std::begin</code>, e.g. VS 2010. </li></ol><p> If not, I can't be more helpful. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 16 Mar 2016 17:01:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12050#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12050#comment:10</guid> <description> <p> Indeed, and unless a self-contained test case is forthcoming, I suggest we close the issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Michel Morin</dc:creator> <pubDate>Thu, 17 Mar 2016 14:53:28 GMT</pubDate> <title>status, severity changed; resolution set https://svn.boost.org/trac10/ticket/12050#comment:11 https://svn.boost.org/trac10/ticket/12050#comment:11 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> So let's close the ticket for now. </p> <p> I also note that the ADL issue is already resolved in both Boost.StringAlgo and Boost.Range. </p> Ticket