Boost C++ Libraries: Ticket #13517: Boost Small Container chokes MSVC+NVCC CUDA 9.1 https://svn.boost.org/trac10/ticket/13517 <p> I wanted to file a bug to a problem I had a year ago that seems to be present in newer version of boost (<a class="ext-link" href="https://stackoverflow.com/questions/42308279/is-boosts-small-vector-compatible-with-nvcc-8"><span class="icon">​</span>https://stackoverflow.com/questions/42308279/is-boosts-small-vector-compatible-with-nvcc-8</a>) </p> <p> Basically nvcc chokes when you include small_vector </p> <p> Steps to reproduce </p> <ol><li>One line program in kernel.cu </li></ol><p> #include &lt;boost/container/small_vector.hpp&gt; <em>look ma, no main </em></p> <ol start="2"><li>Build with typical settings, on my machine: </li></ol><p> 1&gt;------ Build started: Project: boost_test, Configuration: Debug x64 ------ 1&gt; Compiling CUDA source file kernel.cu... 1&gt; 1&gt; C:\Users\Misha\documents\visual studio 2015\Projects\boost_test\boost_test&gt;"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "C:\Users\Misha\documents\visual studio 2015\Projects\boost_test\boost_test\kernel.cu" 1&gt; kernel.cu 1&gt;C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error C2332: 'struct': missing tag name 1&gt; C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(608): note: see reference to class template instantiation 'boost::container::small_vector&lt;T,N,Allocator&gt;' being compiled 1&gt;C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): warning C4346: 'boost::container::vector&lt;T,boost::container::small_vector_allocator&lt;Allocator&gt;&gt;::initial_capacity_t': dependent name is not a type 1&gt; C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): note: prefix with 'typename' to indicate a type 1&gt;C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error C3646: 'initial_capacity_t': unknown override specifier 1&gt;C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error C3254: 'boost::container::small_vector&lt;T,N,Allocator&gt;': class contains explicit override 'initial_capacity_t' but does not derive from an interface that contains the function declaration 1&gt;C:\Boost\include\boost-1_66\boost/container/small_vector.hpp(484): error C2838: 'initial_capacity_t': illegal qualified name in member declaration 1&gt;c:\users\misha\appdata\local\temp\tmpxft_0000af9c_00000000-6_kernel.cudafe1.stub.c(2): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop) 1&gt;tmpxft_0000af9c_00000000-6_kernel.cudafe1.stub.c(1): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop) 1&gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\<a class="missing wiki">BuildCustomizations</a>\CUDA 9.1.targets(707,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "C:\Users\Misha\documents\visual studio 2015\Projects\boost_test\boost_test\kernel.cu"" exited with code 2. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13517 Trac 1.4.3 anonymous Thu, 12 Apr 2018 06:36:30 GMT attachment set https://svn.boost.org/trac10/ticket/13517 https://svn.boost.org/trac10/ticket/13517 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build_log.txt</span> </li> </ul> Ticket anonymous Thu, 12 Apr 2018 06:36:58 GMT attachment set https://svn.boost.org/trac10/ticket/13517 https://svn.boost.org/trac10/ticket/13517 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">kernel.cu</span> </li> </ul> Ticket