Note that there are some explanatory texts on larger screens.

plurals
  1. POCompile Error in Boost throw_exception.hpp
    primarykey
    data
    text
    <p>I am trying to use Boost's lexical_cast for my C++ project but am running into compilation errors using Visual Studio 2010 Professional.</p> <p>Error is as follows:</p> <pre><code>1&gt; VLGUI_Frame.cpp 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(54): error C2143: syntax error : missing ')' before 'constant' 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(54): error C2143: syntax error : missing ';' before 'constant' 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(54): error C2988: unrecognizable template declaration/definition 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(54): error C2059: syntax error : 'constant' 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(54): error C2059: syntax error : ')' 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(72): error C2143: syntax error : missing ';' before '{' 1&gt;c:\users\dev\external\boost_1_46_1\boost\throw_exception.hpp(72): error C2447: '{' : missing function header (old-style formal list?) 1&gt; 1&gt;Build FAILED. </code></pre> <hr> <p>and here is the code that is using lexical_cast (it is not related, but who knows it may help)</p> <pre><code>#include "boost/lexical_cast.hpp" ... std::string Frame::toString( ) { std::string str = ""; try { str = VLString::combine( 12, m_Name.c_str( ), " : Dimensions[", boost::lexical_cast&lt; std::string &gt;( m_Rect.width ).c_str( ), ",", boost::lexical_cast&lt; std::string &gt;( m_Rect.height ).c_str( ), "] : Loc[", boost::lexical_cast&lt; std::string &gt;( m_Rect.x ).c_str( ), ",", boost::lexical_cast&lt; std::string &gt;( m_Rect.y ).c_str( ), "] : NumChildren[", boost::lexical_cast&lt; std::string &gt;( m_Children.size( ) ).c_str( ), "]" ); } catch( boost::bad_lexical_cast &amp; ) { str = VLString::combine( 2, m_Name.c_str( ), " : lexical_cast failed" ); } return str; } </code></pre> <p>Unfortunately I do not have enough experience with Boost to diagnose this problem on my own. I did the obligatory google-ing with no results.</p> <p>Thank you for any help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload