Boost C++ Libraries: Ticket #232: Compiling problems with Regex / MSVC++ 7 https://svn.boost.org/trac10/ticket/232 <pre class="wiki">hello VC++ will not compile the following code with the newest version of the regex library whereas it would with the previous version (g++ 3.2.2 does not have a problem with it). #include &lt;locale&gt; using namespace std; #include &lt;boost/regex.hpp&gt; int main (int argc, char **argv) { return 0; } The error produced is: regbase.hpp(120) : error C2955: 'std::collate' : use of class template requires template argument list The offending line of code is inside an enumeration declaration and looks like this: collate = ::boost::regbase::collate, It seems that VC++ cannot resolve the difference between the enumeration constant and the STL collate class. The same error can be produced with the following code (or anything like it). #include &lt;vector&gt; using namespace std; enum SomeEnum { vector = 0 }; int main (int argc, char **argv) { return 0; } I cannot think of a good way around this short of changing the collate constant name and re-building. The examples are boiled down and it would not be possible for me to change the order of the includes nor would it be easy remove the using delcaration. John </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/232 Trac 1.4.3 johneddy Fri, 06 Feb 2004 02:08:45 GMT summary changed https://svn.boost.org/trac10/ticket/232#comment:1 https://svn.boost.org/trac10/ticket/232#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">Compiling problems with MSVC++ 7</span> → <span class="trac-field-new">Compiling problems with Regex / MSVC++ 7</span> </li> </ul> Ticket John Maddock Fri, 06 Feb 2004 11:45:22 GMT <link>https://svn.boost.org/trac10/ticket/232#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/232#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=14804 I can't rename that constant: we've agreed the use of that name with the C++ committee as part of the regex standardisation proposal. You can get your code to compile either by: 1) switching to a conforming compiler (both gcc and VC.NET 2003 handle the code correctly). 2) moving the using namespace std; clause to after the include of the regex header. I realise that neither of these may be attractive options for an existing project, and I've tried to find a workaround, but so far to no avail. John. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>ramanand</dc:creator> <pubDate>Sun, 20 Mar 2005 20:54:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/232#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/232#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=1243119 Hello John Maddock, I am working with MSVStudio .NET 2000 and therefore I tried using option 2 in the solution you propose. But that does not seem to help either. Any thoughts... Cheers Ramanand </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 07 Oct 2005 12:52:44 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/232#comment:4 https://svn.boost.org/trac10/ticket/232#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=14804 I'm closing this issue, as it appears to be unfixable (and relates to an obsolete compiler). John Maddock </pre> Ticket