2016-09-07 86 views
8

bir hata alıyorum:/std ile MSVC2015 ile boost Derleme: C++ en son (veya C++ 17/N4190) Ben <code>/std:c++latest</code> bayrağıyla MSVC2015 ile destek oluşturmaya çalıştığınızda

boost\algorithm\string\detail\case_conv.hpp(33): error C2143: syntax error: missing ',' before '<' 

puan kullanırken https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs

/std:c++latest also controls the removal of the following old features: N4190 "Removing auto_ptr, random_shuffle(), And Old Stuff", P0004R1 "Removing Deprecated Iostreams Aliases", LWG 2385 "function::assign allocator argument doesn't make sense", and various non-Standard features (the std::tr1 namespace, some TR1-only machinery, and the std::identity struct).

: için: burada bahsedildiği gibi

// a tolower functor 
template<typename CharT> 
struct to_lowerF : public std::unary_function<CharT, CharT> 

Şimdi bu N4190 nedeniyle görünmektedir

std::string a,b; 
return boost::iequals(a,b); 

boost::ilexicographical_compare'u kullanarak.

Onun da burada sözü: C++ en son:

https://blogs.msdn.microsoft.com/vcblog/2015/06/19/c111417-features-in-vs-2015-rtm/

Stephan T. Lavavej - MSFT 

Azarien: Removing auto_ptr/etc. will have positive consequences. It will prevent new code from using outdated/complicated/unsafe 

machinery, and it will reduce confusion among non-expert users. (For example, unnecessary unary_function/binary_function inheritance is common, because many users thought that STL algorithms/containers required this, when in fact only the outdated adapters did.) And auto_ptr in particular is unsafe, because its mutating "copy" constructor silently moves from lvalues.

Peki nasıl VC2015 en/std ile derlemeye destek alabilirim? Şu anda destek C++ 17 uyumlu değil mi?

+0

Rapor sorunu .. http://www.boost.org/development/bugs.html .. https: // svn. boost.org/trac/boost/newticket – GrafikRobot

cevap

9

herhangi başlıklarını eklemeden önce makro _HAS_AUTO_PTR_ETC tanımlayın. Kendi kodunuz için, Visual Studio'nun yapı sistemini kullanıyorsanız, bu en iyisi, projenizin Preprocessor Definitions setting aracılığıyla gerçekleştirilir. Boost'u kendiniz oluşturmak için, b2/bjam çağrınıza define=_HAS_AUTO_PTR_ETC ekleyin. örtülü /std:c++latest olarak devre

Diğer önceden standart işlevselliği makro _HAS_FUNCTION_ASSIGN, _HAS_OLD_IOSTREAMS_MEMBERS ve _HAS_TR1_NAMESPACE tanımlayarak kontrol edilebilir. Bu makrolar aşağıdaki blog makalelerinde özetlenmiştir:

STL Fixes In VS 2015 Update 3
VS 2015 Update 2’s STL is C++17-so-far Feature Complete

İlgili konular