Contribute to Open Source. Search issue labels to find the right project for you!

Eliminate user copy/move ctors, assignment ops, and dtors

mikebmcl/P0267_RefImpl

The paper is going to impose the requirements that the implementation data types support copy and move semantics and will not include the requirement for these backend functions. So these will be automatically generated for the basic_* types and there should be no need for functions like basic_figure_items<GraphicsSurfaces>::abs_new_figure::operator=(const abs_new_figure& other) and backend functions like GraphicsSurfaces::paths::move_abs_new_figure(move(other._Data)).

Updated 23/05/2018 19:55 5 Comments

BUG 2018-04-25 PR

ParoojSMA/Trial

Issue description

-

What’s the expected result?

-

What’s the actual result?

-

Steps to reproduce the issue

Additional details / screenshot

-

Status (OPEN/CLOSED)

Updated 25/04/2018 15:17

Unable to build CubbyFlow in Windows 10

utilForever/CubbyFlow

I am using windows10, VS2017.

My CMake Version is 3.10.2

I followed the instructions in README.md, and when I typed in this: cmake .. -G"Visual Studio 15 2017 Win64" Several errors occured and I was unable to proceed.

Here are copy of terminal messages and CMake Error logs:

Terminal Error log: ```cmd C:\cubbyflow-git\CubbyFlow\build>cmake .. -G"Visual Studio 15 2017 Win64" – The C compiler identification is MSVC 19.12.25831.0 – The CXX compiler identification is MSVC 19.12.25831.0 – Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe – Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe – Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe – works – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Detecting CXX compile features – Detecting CXX compile features - done – Found OpenMP_C: -openmp (found version “2.0”) – Found OpenMP_CXX: -openmp (found version “2.0”) – Found OpenMP: TRUE (found version “2.0”) – Found PythonInterp: C:/Users/____/AppData/Local/Programs/Python/Python36/python.exe (found version “3.6.3”) – Looking for pthread.h – Looking for pthread.h - not found – Found Threads: TRUE – Found Git: C:/Program Files/Git/cmd/git.exe (found version “2.16.1.windows.3”) – git Version: v0.0.0 – Version: 0.0.0 – Performing Test HAVE_STD_REGEX – Performing Test HAVE_STD_REGEX – Performing Test HAVE_STD_REGEX – success – Performing Test HAVE_GNU_POSIX_REGEX – Performing Test HAVE_GNU_POSIX_REGEX – Performing Test HAVE_GNU_POSIX_REGEX – failed to compile – Performing Test HAVE_POSIX_REGEX – Performing Test HAVE_POSIX_REGEX – Performing Test HAVE_POSIX_REGEX – failed to compile – Performing Test HAVE_STEADY_CLOCK – Performing Test HAVE_STEADY_CLOCK – Performing Test HAVE_STEADY_CLOCK – success CMake Error at Libraries/pybind11/tools/FindPythonLibsNew.cmake:155 (message): Python libraries not found Call Stack (most recent call first): Libraries/pybind11/tools/pybind11Tools.cmake:16 (find_package) Libraries/pybind11/CMakeLists.txt:33 (include)

– Configuring incomplete, errors occurred! See also “C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeOutput.log”. See also “C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeError.log”. /build/CMakeFiles/CMakeOutput.log: The system is: Windows - 10.0.16299 - AMD64 Compiling the C compiler identification source file “CMakeCCompilerId.c” succeeded. Compiler:
Build flags: Id flags:

The output was: 0 .NET Framework용 Microsoft ® Build Engine 버전 15.5.180.51428 Copyright © Microsoft Corporation. All rights reserved.

빌드 시작: 2018-04-22 오전 12:09:11 1 노드의 “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdC\CompilerIdC.vcxproj” 프로젝트(기본 대상)입니다. PrepareForBuild: “Debug\” 디렉터리를 만들고 있습니다. “Debug\CompilerIdC.tlog\” 디렉터리를 만들고 있습니다. InitializeBuildStatus: “AlwaysCreate"이(가) 지정되었기 때문에 "Debug\CompilerIdC.tlog\unsuccessfulbuild"을(를) 만들고 있습니다. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\” /Fd"Debug\vc141.pdb" /Gd /TC /errorReport:queue CMakeCCompilerId.c CMakeCCompilerId.c Link: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“.\CompilerIdC.exe” /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /PDB:“.\CompilerIdC.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“.\CompilerIdC.lib” /MACHINE:X64 Debug\CMakeCCompilerId.obj CompilerIdC.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdC.\CompilerIdC.exe PostBuildEvent: for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i :VCEnd CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\Hostx86\x64\cl.exe FinalizeBuildStatus: “Debug\CompilerIdC.tlog\unsuccessfulbuild” 파일을 삭제하고 있습니다. “Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate"에 연결(touching)하고 있습니다. "C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdC\CompilerIdC.vcxproj” 프로젝트를 빌드했습니다(기본 대상).

빌드했습니다. 경고 0개 오류 0개

경과 시간: 00:00:01.36

Compilation of the C compiler identification source “CMakeCCompilerId.c” produced “CompilerIdC.exe”

Compilation of the C compiler identification source “CMakeCCompilerId.c” produced “CompilerIdC.vcxproj”

The C compiler identification is MSVC, found in “C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/3.10.2/CompilerIdC/CompilerIdC.exe”

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” succeeded. Compiler:
Build flags: Id flags:

The output was: 0 .NET Framework용 Microsoft ® Build Engine 버전 15.5.180.51428 Copyright © Microsoft Corporation. All rights reserved.

빌드 시작: 2018-04-22 오전 12:09:13 1 노드의 “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdCXX\CompilerIdCXX.vcxproj” 프로젝트(기본 대상)입니다. PrepareForBuild: “Debug\” 디렉터리를 만들고 있습니다. “Debug\CompilerIdCXX.tlog\” 디렉터리를 만들고 있습니다. InitializeBuildStatus: “AlwaysCreate"이(가) 지정되었기 때문에 "Debug\CompilerIdCXX.tlog\unsuccessfulbuild"을(를) 만들고 있습니다. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\” /Fd"Debug\vc141.pdb" /Gd /TP /errorReport:queue CMakeCXXCompilerId.cpp CMakeCXXCompilerId.cpp Link: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“.\CompilerIdCXX.exe” /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /PDB:“.\CompilerIdCXX.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“.\CompilerIdCXX.lib” /MACHINE:X64 Debug\CMakeCXXCompilerId.obj CompilerIdCXX.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdCXX.\CompilerIdCXX.exe PostBuildEvent: for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i :VCEnd CMAKE_CXX_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\Hostx86\x64\cl.exe FinalizeBuildStatus: “Debug\CompilerIdCXX.tlog\unsuccessfulbuild” 파일을 삭제하고 있습니다. “Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate"에 연결(touching)하고 있습니다. "C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\3.10.2\CompilerIdCXX\CompilerIdCXX.vcxproj” 프로젝트를 빌드했습니다(기본 대상).

빌드했습니다. 경고 0개 오류 0개

경과 시간: 00:00:01.44

Compilation of the CXX compiler identification source “CMakeCXXCompilerId.cpp” produced “CompilerIdCXX.exe”

Compilation of the CXX compiler identification source “CMakeCXXCompilerId.cpp” produced “CompilerIdCXX.vcxproj”

The CXX compiler identification is MSVC, found in “C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/3.10.2/CompilerIdCXX/CompilerIdCXX.exe”

Determining if the C compiler works passed with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_e598f.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework??Microsoft ® Build Engine 踰꾩쟾 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

鍮뚮뱶 ?쒖옉: 2018-04-22 ?ㅼ쟾 12:09:15

1 ?몃뱶??“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e598f.vcxproj” ?꾨줈?앺듃(湲곕낯 ?€???낅땲??

PrepareForBuild:

“cmTC_e598f.dir\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“cmTC_e598f.dir\Debug\cmTC_e598f.tlog\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

InitializeBuildStatus:

“AlwaysCreate”??媛€) 吏€?뺣릺?덇린 ?뚮Ц??“cmTC_e598f.dir\Debug\cmTC_e598f.tlog\unsuccessfulbuild”??瑜? 留뚮뱾怨??덉뒿?덈떎.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_e598f.dir\Debug\” /Fd"cmTC_e598f.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\testCCompiler.c”

Microsoft ® C/C++ 理쒖쟻??而댄뙆?쇰윭 踰꾩쟾 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_e598f.dir\Debug\” /Fd"cmTC_e598f.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\testCCompiler.c”

testCCompiler.c

Link:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_e598f.exe” /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /DEBUG /PDB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_e598f.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_e598f.lib” /MACHINE:X64 /machine:x64 cmTC_e598f.dir\Debug\testCCompiler.obj

cmTC_e598f.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_e598f.exe

FinalizeBuildStatus:

“cmTC_e598f.dir\Debug\cmTC_e598f.tlog\unsuccessfulbuild” ?뚯씪????젣?섍퀬 ?덉뒿?덈떎.

“cmTC_e598f.dir\Debug\cmTC_e598f.tlog\cmTC_e598f.lastbuildstate”???곌껐(touching)?섍퀬 ?덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e598f.vcxproj” ?꾨줈?앺듃瑜?鍮뚮뱶?덉뒿?덈떎(湲곕낯 ?€??.

鍮뚮뱶?덉뒿?덈떎.

寃쎄퀬 0媛?
?ㅻ쪟 0媛?

寃쎄낵 ?쒓컙: 00:00:01.57

Detecting C compiler ABI info compiled with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_be202.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework??Microsoft ® Build Engine 踰꾩쟾 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

鍮뚮뱶 ?쒖옉: 2018-04-22 ?ㅼ쟾 12:09:17

1 ?몃뱶??“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_be202.vcxproj” ?꾨줈?앺듃(湲곕낯 ?€???낅땲??

PrepareForBuild:

“cmTC_be202.dir\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“cmTC_be202.dir\Debug\cmTC_be202.tlog\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

InitializeBuildStatus:

“AlwaysCreate”??媛€) 吏€?뺣릺?덇린 ?뚮Ц??“cmTC_be202.dir\Debug\cmTC_be202.tlog\unsuccessfulbuild”??瑜? 留뚮뱾怨??덉뒿?덈떎.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_be202.dir\Debug\” /Fd"cmTC_be202.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\Program Files\CMake\share\cmake-3.10\Modules\CMakeCCompilerABI.c”

Microsoft ® C/C++ 理쒖쟻??而댄뙆?쇰윭 踰꾩쟾 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_be202.dir\Debug\” /Fd"cmTC_be202.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\Program Files\CMake\share\cmake-3.10\Modules\CMakeCCompilerABI.c”

CMakeCCompilerABI.c

Link:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_be202.exe” /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /DEBUG /PDB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_be202.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_be202.lib” /MACHINE:X64 /machine:x64 cmTC_be202.dir\Debug\CMakeCCompilerABI.obj

cmTC_be202.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_be202.exe

FinalizeBuildStatus:

“cmTC_be202.dir\Debug\cmTC_be202.tlog\unsuccessfulbuild” ?뚯씪????젣?섍퀬 ?덉뒿?덈떎.

“cmTC_be202.dir\Debug\cmTC_be202.tlog\cmTC_be202.lastbuildstate”???곌껐(touching)?섍퀬 ?덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_be202.vcxproj” ?꾨줈?앺듃瑜?鍮뚮뱶?덉뒿?덈떎(湲곕낯 ?€??.

鍮뚮뱶?덉뒿?덈떎.

寃쎄퀬 0媛?
?ㅻ쪟 0媛?

寃쎄낵 ?쒓컙: 00:00:01.40

Determining if the CXX compiler works passed with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_98336.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework??Microsoft ® Build Engine 踰꾩쟾 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

鍮뚮뱶 ?쒖옉: 2018-04-22 ?ㅼ쟾 12:09:18

1 ?몃뱶??“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_98336.vcxproj” ?꾨줈?앺듃(湲곕낯 ?€???낅땲??

PrepareForBuild:

“cmTC_98336.dir\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“cmTC_98336.dir\Debug\cmTC_98336.tlog\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

InitializeBuildStatus:

“AlwaysCreate”??媛€) 吏€?뺣릺?덇린 ?뚮Ц??“cmTC_98336.dir\Debug\cmTC_98336.tlog\unsuccessfulbuild”??瑜? 留뚮뱾怨??덉뒿?덈떎.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_98336.dir\Debug\” /Fd"cmTC_98336.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx”

Microsoft ® C/C++ 理쒖쟻??而댄뙆?쇰윭 踰꾩쟾 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_98336.dir\Debug\” /Fd"cmTC_98336.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx”

testCXXCompiler.cxx

Link:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_98336.exe” /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /DEBUG /PDB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_98336.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_98336.lib” /MACHINE:X64 /machine:x64 cmTC_98336.dir\Debug\testCXXCompiler.obj

cmTC_98336.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_98336.exe

FinalizeBuildStatus:

“cmTC_98336.dir\Debug\cmTC_98336.tlog\unsuccessfulbuild” ?뚯씪????젣?섍퀬 ?덉뒿?덈떎.

“cmTC_98336.dir\Debug\cmTC_98336.tlog\cmTC_98336.lastbuildstate”???곌껐(touching)?섍퀬 ?덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_98336.vcxproj” ?꾨줈?앺듃瑜?鍮뚮뱶?덉뒿?덈떎(湲곕낯 ?€??.

鍮뚮뱶?덉뒿?덈떎.

寃쎄퀬 0媛?
?ㅻ쪟 0媛?

寃쎄낵 ?쒓컙: 00:00:01.51

Detecting CXX compiler ABI info compiled with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_675fd.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework??Microsoft ® Build Engine 踰꾩쟾 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

鍮뚮뱶 ?쒖옉: 2018-04-22 ?ㅼ쟾 12:09:20

1 ?몃뱶??“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_675fd.vcxproj” ?꾨줈?앺듃(湲곕낯 ?€???낅땲??

PrepareForBuild:

“cmTC_675fd.dir\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“cmTC_675fd.dir\Debug\cmTC_675fd.tlog\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

InitializeBuildStatus:

“AlwaysCreate”??媛€) 吏€?뺣릺?덇린 ?뚮Ц??“cmTC_675fd.dir\Debug\cmTC_675fd.tlog\unsuccessfulbuild”??瑜? 留뚮뱾怨??덉뒿?덈떎.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_675fd.dir\Debug\” /Fd"cmTC_675fd.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\Program Files\CMake\share\cmake-3.10\Modules\CMakeCXXCompilerABI.cpp”

Microsoft ® C/C++ 理쒖쟻??而댄뙆?쇰윭 踰꾩쟾 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_675fd.dir\Debug\” /Fd"cmTC_675fd.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\Program Files\CMake\share\cmake-3.10\Modules\CMakeCXXCompilerABI.cpp”

CMakeCXXCompilerABI.cpp

Link:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_675fd.exe” /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /DEBUG /PDB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_675fd.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_675fd.lib” /MACHINE:X64 /machine:x64 cmTC_675fd.dir\Debug\CMakeCXXCompilerABI.obj

cmTC_675fd.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_675fd.exe

FinalizeBuildStatus:

“cmTC_675fd.dir\Debug\cmTC_675fd.tlog\unsuccessfulbuild” ?뚯씪????젣?섍퀬 ?덉뒿?덈떎.

“cmTC_675fd.dir\Debug\cmTC_675fd.tlog\cmTC_675fd.lastbuildstate”???곌껐(touching)?섍퀬 ?덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_675fd.vcxproj” ?꾨줈?앺듃瑜?鍮뚮뱶?덉뒿?덈떎(湲곕낯 ?€??.

鍮뚮뱶?덉뒿?덈떎.

寃쎄퀬 0媛?
?ㅻ쪟 0媛?

寃쎄낵 ?쒓컙: 00:00:01.51

Detecting CXX [] compiler features compiled with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_5493d.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework??Microsoft ® Build Engine 踰꾩쟾 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

鍮뚮뱶 ?쒖옉: 2018-04-22 ?ㅼ쟾 12:09:22

1 ?몃뱶??“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_5493d.vcxproj” ?꾨줈?앺듃(湲곕낯 ?€???낅땲??

PrepareForBuild:

“cmTC_5493d.dir\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

“cmTC_5493d.dir\Debug\cmTC_5493d.tlog\” ?붾젆?곕━瑜?留뚮뱾怨??덉뒿?덈떎.

InitializeBuildStatus:

“AlwaysCreate”??媛€) 吏€?뺣릺?덇린 ?뚮Ц??“cmTC_5493d.dir\Debug\cmTC_5493d.tlog\unsuccessfulbuild”??瑜? 留뚮뱾怨??덉뒿?덈떎.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_5493d.dir\Debug\” /Fd"cmTC_5493d.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\feature_tests.cxx”

Microsoft ® C/C++ 理쒖쟻??而댄뙆?쇰윭 踰꾩쟾 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_5493d.dir\Debug\” /Fd"cmTC_5493d.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\feature_tests.cxx”

feature_tests.cxx

Link:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_5493d.exe” /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /manifest:embed /DEBUG /PDB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_5493d.pdb” /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:“C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp/Debug/cmTC_5493d.lib” /MACHINE:X64 /machine:x64 cmTC_5493d.dir\Debug\feature_tests.obj

cmTC_5493d.vcxproj -> C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\cmTC_5493d.exe

FinalizeBuildStatus:

“cmTC_5493d.dir\Debug\cmTC_5493d.tlog\unsuccessfulbuild” ?뚯씪????젣?섍퀬 ?덉뒿?덈떎.

“cmTC_5493d.dir\Debug\cmTC_5493d.tlog\cmTC_5493d.lastbuildstate”???곌껐(touching)?섍퀬 ?덉뒿?덈떎.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_5493d.vcxproj” ?꾨줈?앺듃瑜?鍮뚮뱶?덉뒿?덈떎(湲곕낯 ?€??.

鍮뚮뱶?덉뒿?덈떎.

寃쎄퀬 0媛?
?ㅻ쪟 0媛?

寃쎄낵 ?쒓컙: 00:00:01.48

Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers
Feature record: CXX_FEATURE:1cxx_alias_templates
Feature record: CXX_FEATURE:1cxx_alignas
Feature record: CXX_FEATURE:1cxx_alignof
Feature record: CXX_FEATURE:1cxx_attributes
Feature record: CXX_FEATURE:1cxx_attribute_deprecated
Feature record: CXX_FEATURE:1cxx_auto_type
Feature record: CXX_FEATURE:1cxx_binary_literals
Feature record: CXX_FEATURE:1cxx_constexpr
Feature record: CXX_FEATURE:1cxx_contextual_conversions
Feature record: CXX_FEATURE:1cxx_decltype
Feature record: CXX_FEATURE:1cxx_decltype_auto
Feature record: CXX_FEATURE:1cxx_default_function_template_args
Feature record: CXX_FEATURE:1cxx_defaulted_functions
Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:1cxx_delegating_constructors
Feature record: CXX_FEATURE:1cxx_deleted_functions
Feature record: CXX_FEATURE:1cxx_digit_separators
Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
Feature record: CXX_FEATURE:1cxx_explicit_conversions
Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
Feature record: CXX_FEATURE:1cxx_extern_templates
Feature record: CXX_FEATURE:1cxx_final
Feature record: CXX_FEATURE:1cxx_func_identifier
Feature record: CXX_FEATURE:1cxx_generalized_initializers
Feature record: CXX_FEATURE:1cxx_generic_lambdas
Feature record: CXX_FEATURE:1cxx_inheriting_constructors
Feature record: CXX_FEATURE:1cxx_inline_namespaces
Feature record: CXX_FEATURE:1cxx_lambdas
Feature record: CXX_FEATURE:1cxx_lambda_init_captures
Feature record: CXX_FEATURE:1cxx_local_type_template_args
Feature record: CXX_FEATURE:1cxx_long_long_type
Feature record: CXX_FEATURE:1cxx_noexcept
Feature record: CXX_FEATURE:1cxx_nonstatic_member_init
Feature record: CXX_FEATURE:1cxx_nullptr
Feature record: CXX_FEATURE:1cxx_override
Feature record: CXX_FEATURE:1cxx_range_for
Feature record: CXX_FEATURE:1cxx_raw_string_literals
Feature record: CXX_FEATURE:1cxx_reference_qualified_functions
Feature record: CXX_FEATURE:1cxx_return_type_deduction
Feature record: CXX_FEATURE:1cxx_right_angle_brackets
Feature record: CXX_FEATURE:1cxx_rvalue_references
Feature record: CXX_FEATURE:1cxx_sizeof_member
Feature record: CXX_FEATURE:1cxx_static_assert
Feature record: CXX_FEATURE:1cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:1cxx_thread_local
Feature record: CXX_FEATURE:1cxx_trailing_return_types
Feature record: CXX_FEATURE:1cxx_unicode_literals
Feature record: CXX_FEATURE:1cxx_uniform_initialization
Feature record: CXX_FEATURE:1cxx_unrestricted_unions
Feature record: CXX_FEATURE:1cxx_user_literals
Feature record: CXX_FEATURE:1cxx_variable_templates
Feature record: CXX_FEATURE:1cxx_variadic_macros
Feature record: CXX_FEATURE:1cxx_variadic_templates
/build/CMakeFiles/CMakeError.log

Determining if the include file pthread.h exists failed with the following output: Change Dir: C:/cubbyflow-git/CubbyFlow/build/CMakeFiles/CMakeTmp

Run Build Command:“C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe” “cmTC_e330f.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=15.0” .NET Framework용 Microsoft ® Build Engine 버전 15.5.180.51428

Copyright © Microsoft Corporation. All rights reserved.

빌드 시작: 2018-04-22 오전 12:09:32

1 노드의 “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e330f.vcxproj” 프로젝트(기본 대상)입니다.

PrepareForBuild:

“cmTC_e330f.dir\Debug\” 디렉터리를 만들고 있습니다.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\Debug\” 디렉터리를 만들고 있습니다.

“cmTC_e330f.dir\Debug\cmTC_e330f.tlog\” 디렉터리를 만들고 있습니다.

InitializeBuildStatus:

“AlwaysCreate"이(가) 지정되었기 때문에 "cmTC_e330f.dir\Debug\cmTC_e330f.tlog\unsuccessfulbuild"을(를) 만들고 있습니다.

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /openmp /Fo"cmTC_e330f.dir\Debug\” /Fd"cmTC_e330f.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c”

Microsoft ® C/C++ 최적화 컴파일러 버전 19.12.25831(x64)

Copyright © Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D WINDOWS /D “CMAKE_INTDIR=\"Debug\”“ /D MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /openmp /Fo"cmTC_e330f.dir\Debug\” /Fd"cmTC_e330f.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue “C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c”

CheckIncludeFile.c

C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: 포함 파일을 열 수 없습니다. ‘pthread.h’: No such file or directory [C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e330f.vcxproj]

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e330f.vcxproj” 프로젝트를 빌드했습니다(기본 대상). - 실패

빌드하지 못했습니다.

“C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e330f.vcxproj”(기본 대상)(1)->

(ClCompile 대상) ->

C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: 포함 파일을 열 수 없습니다. ‘pthread.h’: No such file or directory [C:\cubbyflow-git\CubbyFlow\build\CMakeFiles\CMakeTmp\cmTC_e330f.vcxproj]

경고 0개

오류 1개

경과 시간: 00:00:00.91

```

  • I removed my username in %appdata% path because it is personal info.
Updated 26/04/2018 14:51 11 Comments

gsl::make_span from std::wstring doesn't compile in VS2015

Microsoft/GSL

VS 2017 15.6.6 (toolset v140) ```c++

include “stdafx.h”

include <string>

include “gsl\gsl”

int main() { std::wstring s; auto r = gsl::make_span(s);

return 0;

} **Build output:** c++ 1>xxx\3rdparty\include\gsl\span(394): error C2664: ‘gsl::span<wchar_t,-1>::span(gsl::span<wchar_t,-1>::KnownNotNull,gsl::span<wchar_t,-1>::index_type)’: cannot convert argument 1 from ‘const wchar_t ’ to ‘wchar_t ’ 1>xxx\3rdparty\include\gsl\span(394): note: Conversion loses qualifiers 1>xxx\3rdparty\include\gsl\span(678): note: see reference to function template instantiation ‘gsl::span<wchar_t,-1>::span<Container,void>(Container &)’ being compiled 1> with 1> [ 1> Container=std::wstring 1> ] 1>xxx\3rdparty\include\gsl\span(678): note: see reference to function template instantiation ‘gsl::span<wchar_t,-1>::span<Container,void>(Container &)’ being compiled 1> with 1> [ 1> Container=std::wstring 1> ] 1>xxx\src\ttt\ttt.cpp(8): note: see reference to function template instantiation ‘gsl::span<wchar_t,-1> gsl::make_span<std::wstring>(Container &)’ being compiled 1> with 1> [ 1> Container=std::wstring 1> ] ```

Updated 25/04/2018 01:25 4 Comments

Comparisons between spans of different extents?

Microsoft/GSL

Currently, separate extent template parameters are used for the left and right operands of span’s operator==:

template <class ElementType, std::ptrdiff_t FirstExtent, std::ptrdiff_t SecondExtent>
constexpr bool operator==(span<ElementType, FirstExtent> l,
                          span<ElementType, SecondExtent> r);

This is not so for operator!=:

template <class ElementType, std::ptrdiff_t Extent>
constexpr bool operator!=(span<ElementType, Extent> l,
                          span<ElementType, Extent> r);

And not so for the remaining comparison operators either:

template <class ElementType, std::ptrdiff_t Extent>
constexpr bool operator<(span<ElementType, Extent> l,
                         span<ElementType, Extent> r);
template <class ElementType, std::ptrdiff_t Extent>
constexpr bool operator<=(span<ElementType, Extent> l,
                          span<ElementType, Extent> r);
template <class ElementType, std::ptrdiff_t Extent>
constexpr bool operator>(span<ElementType, Extent> l,
                         span<ElementType, Extent> r);
template <class ElementType, std::ptrdiff_t Extent>
constexpr bool operator>=(span<ElementType, Extent> l,
                          span<ElementType, Extent> r);

The change to only operator== was done over a year ago. P0122, which has been voted into C++20, does not have this treatment for operator== at all. Was there a rationale behind (not) allowing different extents for the operands?


Related: What about separate element types? In particular it is rather cumbersome to compare spans when one of them is span<T> and the other is span<const T>:

std::byte my_buffer[1024] = { };
// std::array<std::byte, 1024> my_buffer = { }; // gsl::make_span will not deduce the extent

void update_my_buffer(gsl::span<const std::byte, 1024> samples)
{
    if (samples != gsl::make_span(std::as_const(my_buffer)))
    {
        gsl::copy(samples, gsl::make_span(my_buffer));
    }
}

Compare to:

    if (auto my_span = gsl::make_span(my_buffer); samples != my_span)
    {
        gsl::copy(samples, my_span);
    }

Or simply repeating the definition of span’s comparison operators:

    auto my_span = gsl::make_span(my_buffer);
    if (!std::equal(samples.begin(), samples.end(), my_span.begin(), my_span.end()))
    {
        gsl::copy(samples, my_span);
    }

Or even:

    if (!ranges::equal(samples, my_buffer))
    {
        ranges::copy(samples, my_buffer);
    }

If these more generic solutions work and possibly express the intent of the code clearer, does span really need the same-type same-extent comparison operators? P0122 makes no mentions of this. Is this an early design decision?

Updated 20/04/2018 02:19 2 Comments

Merging the Ranges TS

ericniebler/stl2
  • [x] Rethink iterator traits:
    • Play nicely with code that specializes std::iterator_traits.
  • [x] Rethink iterator tags:
    • Parallel set of tags, like the Ranges TS?
    • One set of tags with a “is-new-style” trait?
    • One set of tags, and no nested ::iterator_category means “is-new-style” (dispatch with concept-based overloading)?
  • [x] Make existing standard iterators and iterator adaptors satisfy the new concepts:
    • Default constructible
    • More?
  • [ ] Make old algorithms work with new iterators and iter_swap/iter_move (insofar as it’s possible)
  • [ ] Rethink tagged:
    • Merge functionality with pair and tuple?
    • Simply remove functionality (because structured bindings)?
    • Each algorithm returns an unspecified tuple-like type with named accessors?
  • [ ] Rethink function objects:
    • Rename ranges::less to std::ordered_less and remove the others?
    • Keep them as-is?
  • [ ] Propose changes to pair and tuple to make them work as-is with view::zip.
  • [ ] Customization point redesign (if feasible):
    • [ ] Make namespace-scoped overloads of swap hidden friends instead.
    • [ ] Attempted redesign of begin, end, et.al. if it doesn’t make the world blow up.
  • [ ] Investigate possibility of deprecating move_iterator and propose move_into_iterator (output iterator adaptor).

ATTN @CaseyCarter we have some work to do.

Updated 25/04/2018 23:58 1 Comments

Reporting UI

Ecotrust/ucsrb
  • [ ] Redesign template to report list of values for Forest Management report - no need for guessing at format
  • [ ] Hydro results need to be line graph, not bar graph
  • [ ] Hydro results need to fit inside panel (overflow if too large - test with short screen)
Updated 04/04/2018 18:52 1 Comments

Anisotropy transform

PauloCarvalhoRJ/gammaray

Distort and rotate a data set in space such that the result becomes isotropic. The user enters an anisotropy ellipse and the program applies inverse transforms aiming at removing the interpreted anisotropy.

Updated 18/03/2018 13:56 1 Comments

URL parsing to check whether the URL crawled is styled properly

deydebaditya/zulu

<b>Contributor Info: </b> <i>Debaditya Dey</i> <br> <br> <b><i>ISSUE</i></b> <br> URL that is crawled from links can be of the form <i>https://www.xyz.com/abc.html</i> or can be <i>/contact.html</i><br> Thus, the URL needs parsing to be in a well formed manner so that crawling them won’t produce any errors. <br> Examples of malformed URLs are as given below:<br> malformedurl

Updated 09/03/2018 17:56 3 Comments

arcticdatautils function pid_to_eml_physical only works for ADC

NCEAS/datamgmt

arcticdatautils::pid_to_eml_physical is one of most useful functions but specific fields only work for uploads to the Arctic Data Center.
For instance the following creates the online distribution info link:

phys@distribution[[1]]@online@url <- new("url", paste0("https://cn.dataone.org/cn/v2/resolve/", 
            x@identifier))

We should generalize this function to work across all (or alot) of the dataOne member nodes - definitely test ADC to start.

Updated 12/03/2018 17:03 2 Comments

React + Redux: Fundamentos e Duas Apps do ABSOLUTO ZERO!

wgoulart/personal-goals

## :sparkles: React + Redux: Fundamentos e Duas Apps do ABSOLUTO ZERO!

Section 1 - Introdução

  • [ ] Visão Geral do Curso
  • [ ] Assine o Nosso Canal
  • [ ] Repositório do Curso & Apostila (Versão BETA)
  • [ ] Configuração do Ambiente

Section 2 - Webpack

  • [ ] Visão Geral e Instalação
  • [ ] Configuração Inicial
  • [ ] Criando o index.html
  • [ ] Testando a Configuração
  • [ ] Usando o Sistema de Módulos do CommonsJS
  • [ ] Importância da referência
  • [ ] Usando EcmaScript 2015 sem Babel
  • [ ] Usando o Sistema de Módulos do ES2015 (Babel)
  • [ ] Interpretando o Operador Spread (Plugin Babel)
  • [ ] Adicionando o Preset do React
  • [ ] Adicionando o Loader para CSS

Section 3 - React

  • [ ] Configurando o Projeto
  • [ ] Configurando o Build com Webpack
  • [ ] Criando o arquivo index.html
  • [ ] Olá React
  • [ ] Primeiro Componente
  • [ ] Primeiro Componente (Arrow Function)
  • [ ] Usando as Propriedades do Componente
  • [ ] Exportando mais de um Componente
  • [ ] Componentes Filhos
  • [ ] Componentes Filhos
  • [ ] Passando Propriedades para Componentes Filhos (Parte 1)
  • [ ] Passando Propriedades para Componentes Filhos (Parte 2)
  • [ ] Componente de Classe
  • [ ] Contador
  • [ ] Componentes Controlados/Não Controlados

Section 4 - TodoApp (Backend)

  • [ ] Visão Geral
  • [ ] Configuração e Instalação
  • [ ] Configurando o Servidor com o Express
  • [ ] Conexão com o Banco de Dados
  • [ ] ODM e Criação da API REST
  • [ ] Mapeamento das Rotas
  • [ ] Testando a API (Postman)
  • [ ] Habilitando o CORS
  • [ ] Iniciando o Backend com PM2

Section 5 - TodoApp (Frontend)

  • [ ] Configuração e Instalação
  • [ ] Configurando o Build com Webpack
  • [ ] Criação do index.html
  • [ ] Componente App
  • [ ] Componentes Todo e About
  • [ ] Componente Menu
  • [ ] Configurando as Rotas (React-Router)
  • [ ] Componente PageHeader
  • [ ] Componentes TodoForm e TodoList
  • [ ] Estratégia de Implementação
  • [ ] Estrutura do Formulário
  • [ ] Componentes Grid e IconButton
  • [ ] Renderização Condicional (If)
  • [ ] Evento Adicionar
  • [ ] Evento onChange
  • [ ] Evento Adicionar (Integração Backend)
  • [ ] Consulta e Exclusão de TODOs
  • [ ] Marcar como Concluído/Pendente
  • [ ] Pesquisa de TODOs
  • [ ] Melhorias de CSS e Limpar Formulário
  • [ ] Adicionar Teclas de Atalhos

Section 6 - React com Redux

  • [ ] Palavras Iniciais e Instalação
  • [ ] Conhecendo o Redux
  • [ ] Configurando o Redux
  • [ ] Ex 01 - Integrando o React-Redux (Parte 1)
  • [ ] Ex 01 - Integrando o React-Redux (Parte 2)
  • [ ] Ex 01 - Integrando o React-Redux (Parte 3)
  • [ ] Ex 02 - Integrando o React-Redux (Parte 1)
  • [ ] Ex 02 - Integrando o React-Redux (Parte 2)

Section 7 - TodoApp (Migração para Redux)

  • [ ] Instalando as Dependências
  • [ ] Configurando os Reducers
  • [ ] Configurando o Redux
  • [ ] Conectar o TodoList com Redux
  • [ ] Conectar o TodoForm com Redux
  • [ ] Action Creator changeDescription
  • [ ] Configurando o Redux Dev Tools
  • [ ] Action Creator de Pesquisa
  • [ ] Aplicando Middleware (Redux-Promise)
  • [ ] Adicionar TODO
  • [ ] Aplicando Middleware (Redux-Multi)
  • [ ] Aplicando Middleware (Redux-Thunk)
  • [ ] Marcar como Concluído/Pendente
  • [ ] Exclusão de TODOs
  • [ ] Limpar Formulário
  • [ ] Melhorando a Action de Pesquisa

Section 8 - Aplicação Final - Ciclos de Pagamentos (Backend)

  • [ ] Visão Geral
  • [ ] Configuração e Instalação
  • [ ] Configurando o Servidor com o Express
  • [ ] Conexão com o Banco de Dados
  • [ ] Mapeamento Objeto-Documento (ODM)
  • [ ] Criação da API REST
  • [ ] Mapeamento das Rotas
  • [ ] Testando a API (Postman)
  • [ ] Obtendo a Qtde de Registros (Count)
  • [ ] Obtendo o Sumário de Pagamentos
  • [ ] Tratando as Mensagens de Erro
  • [ ] Habilitando o CORS
  • [ ] Middleware Query Parser Int

Section 9 - Aplicação Final - Ciclos de Pagamentos (Frontend)

  • [ ] Visão Geral
  • [ ] Comunicado IMPORTANTE sobre o AdminLTE
  • [ ] Configuração e Instalação
  • [ ] Configurando o Build com Webpack
  • [ ] Criação do index.html
  • [ ] Componentes Index e App
  • [ ] Dependências do Template (AdminLTE)
  • [ ] Componente Cabeçalho
  • [ ] Componente Menu (Parte 1)
  • [ ] Componente Menu (Parte 2)
  • [ ] Componente Rodapé
  • [ ] Navegação com React-router
  • [ ] Componente de Título do Conteúdo
  • [ ] Componente Dashboard: Visão Geral
  • [ ] Componente Grid
  • [ ] Componente ValueBox
  • [ ] Usando ValueBox
  • [ ] Configurando Redux
  • [ ] Integrando Dashboard com Redux (Parte 1)
  • [ ] Integrando Dashboard com Redux (Parte 2)
  • [ ] Ciclo React-Redux com Middlewares
  • [ ] Configurando Redux DevTools
  • [ ] Dashboard SEM Redux
  • [ ] Visão Geral dos Componentes de Abas
  • [ ] Componente BillingCycle: Refatorando para Classe
  • [ ] Componentes Estruturais das Abas
  • [ ] Componente TabHeader
  • [ ] Criando a Primeira Action e o Reducer
  • [ ] Componente TabHeader: Conectando com Redux
  • [ ] Componente Tab Content
  • [ ] Componente BillingCycle: Conectando com Redux
  • [ ] Visibilidade das Abas (Parte 1)
  • [ ] Visibilidade das Abas (Parte 2)
  • [ ] Componente de Lista: Visão Geral
  • [ ] Criando a Action “getList” e o Reducer
  • [ ] Componente BillingCycleList
  • [ ] Integrando BillingCycleList com Redux
  • [ ] Exibindo os dados em BillingCycleList
  • [ ] BillingCycleForm com Redux-Form (Parte 01)
  • [ ] BillingCycleForm com Redux-Form (Parte 02)
  • [ ] Exibindo as Mensagens de Sucesso e Erro
  • [ ] Melhorias na Inclusão do Ciclo de Pagamento
  • [ ] Field com Componente Personalizado
  • [ ] Exibir Aba de Alterar Ciclo de Pagamento
  • [ ] Inicializar Formulário com Dados
  • [ ] Função do Botão Cancelar
  • [ ] Alterar Ciclo de Pagamento
  • [ ] Excluir Ciclo de Pagamento
  • [ ] Finalizando o Cadastro Básico (Melhorias)
  • [ ] Componente CreditList Básico
  • [ ] Componente Input para CreditList
  • [ ] Evoluindo o Componente CreditList
  • [ ] Adicionar e Clonar Créditos
  • [ ] Remover Créditos
  • [ ] Generalizando o Componente CreditList
  • [ ] Adicionando o Campo Status no ItemList
  • [ ] Componente Summary
  • [ ] Integrar Soma de Créditos e Débitos

Section 10 - Melhorias e Correções

  • [ ] Problema de Responsividade do Menu
  • [ ] Navegação com React-router (Versão 2)

Section 11 - Aplicação Final - Autenticação (Backend)

  • [ ] Apostila do Curso (Versão BETA)
  • [ ] Autenticação - Backend (Parte 01)
  • [ ] Autenticação - Backend (Parte 02)
  • [ ] Autenticação - Backend (Parte 03)
  • [ ] Autenticação - Backend (Parte 04)
  • [ ] Autenticação - Backend (Parte 05)
  • [ ] Autenticação - Backend (Parte 07)
  • [ ] Autenticação - Backend (Parte 07)
  • [ ] Autenticação - Backend (Parte 08)
  • [ ] Autenticação - Backend (Parte 09)

Section 12 - Aplicação Final - Autenticação (Frontend)

  • [ ] Autenticação - Frontend (Parte 01)
  • [ ] Autenticação - Frontend (Parte 02)
  • [ ] Autenticação - Frontend (Parte 03)
  • [ ] Autenticação - Frontend (Parte 04)
  • [ ] Autenticação - Frontend (Parte 05)
  • [ ] Autenticação - Frontend (Parte 06)

Section 13 - Deploy Heroku

  • [ ] Deploy do Backend #01
  • [ ] Deploy do Frontend #02

Section 14 - Bônus: Exercícios MongoDB

  • [ ] Mongo - Visão Geral
  • [ ] Mongo - Exercício 01: Comandos Básicos
  • [ ] Mongo - Exercício 02: Inserções
  • [ ] Mongo - Exercício 03: Consultas
  • [ ] Mongo - Exercício 04: Agregação
  • [ ] Mongo - Exercício 05: Atualização
  • [ ] Mongo - Exercício 06: Contador e Remoções

Section 15 - Bônus: Exercícios Node

  • [ ] Node - Exercício 01: Javascript Básico
  • [ ] Node - Exercício 02: Sistema de Módulos
  • [ ] Node - Exercício 03: Singleton
  • [ ] Node - Exercício 04: Objeto Global
  • [ ] Node - Exercício 05: This
  • [ ] Node - Exercício 06: Módulo Externo (Lodash)
  • [ ] Node - Exercício 07: Passagem de Parâmetros
  • [ ] Node - Exercício 08: Process (ARGV)
  • [ ] Node - Exercício 09: Process (STDIN/STDOUT)
  • [ ] Node - Exercício 10: Módulo FS
  • [ ] Node - Exercício 11: Módulo HTTP

Section 16 - Bônus: Exercícios Express

  • [ ] Express - Visão Geral
  • [ ] Express - Exercício 01: Configuração e Mapeando uma Rota
  • [ ] Express - Exercício 02: Cadeia de Middlewares
  • [ ] Express - Exercício 03: Método USE
  • [ ] Express - Exercício 04: Método Route
  • [ ] Express - Exercício 05: Express Router
  • [ ] Express - Exercício 06: Express e Router são Singletons?
Updated 15/03/2018 22:16

JS com TDD na Prática

wgoulart/personal-goals

:sparkles: Curso JS com TDD na Prática

Section 1 - Boas Práticas

  • [x] Introdução
  • [x] Configurando o NPM e Criando o package.json
  • [x] Criando o gitignore de forma simples
  • [x] Criando arquivos para documentação
  • [x] Padrões de Código - Styleguides
  • [x] Instalando e Usando o Eslint
  • [x] UPDATE: Atualizando o Eslint para 4+
  • [x] Configurando o editorconfig
  • [x] Criando um Npm Script
  • [x] Configurando hooks no git

Section 3 - Módulos em JS

  • [x] Introdução a Módulos em JS
  • [x] Configurando o Webpack
  • [x] Trabalhando com Imports no ES6
  • [x] Trabalhando com Exports no ES6
  • [x] UglifyJS no Webpack
  • [x] Variáveis de Ambiente no Webpack
  • [x] Adicionando Sourcemaps em nosso código
  • [x] Inicializando um server com Webpack

Section 4 - Teoria de Testes

  • [x] Qualidade de Software
  • [x] Alguns fatores para alcançar qualidade em seu projeto
  • [x] Por que testar?
  • [x] Como funciona o fluxo do TDD?
  • [x] Como pensar em testes? Padrão de teste.
  • [x] Tipos de Testes
  • [x] Algumas dicas para os tipos de testes
  • [x] Spies, Stubs e Mocks

Section 5 - Unindo conceitos na prática

  • [x] Apresentando Ferramentas
  • [x] Iniciando a estrutura com Mocha e Chai
  • [x] Funcionamento do Mocha - describe, context, it…
  • [x] Reporters do Mocha
  • [x] Comandos Skip, Only, Bail
  • [x] Introdução aos Hooks do Mocha
  • [x] Hooks na Prática
  • [x] Métodos do Chai
  • [x] Criando uma calculadora simples - Pt1
  • [x] Criando uma calculadora simples - Pt2
  • [x] Convertendo e testando em ES6
  • [x] Criando um FizzBuzz com TDD
  • [x] Aplicando o Code Coverage
  • [x] Rodando check-coverage antes de cada push

Section 6 - Criando uma Biblioteca Wrapper da API do Spotify

  • [x] Introdução da Biblioteca
  • [x] Clonando o Boilerplate e editando
  • [x] Criando Smoke Tests
  • [x] Instalando Sinon e dependências
  • [x] Utilizando o calledOnce
  • [x] Utilizando o calledWith
  • [x] Utilizando context e refatorando código de teste
  • [x] Retornando Promises
  • [x] Escrevendo testes para métodos restantes
  • [x] Rodando um exemplo no Node
  • [x] Criando arquivos para o Endpoint de Albums
  • [x] Refatorando e reorganizando o código
  • [x] Transpilando a biblioteca com Babel
  • [x] Utilizando o Webpack para gerar a biblioteca em UMD
  • [x] Criando um exemplo simples com a biblioteca em UMD
  • [x] Criando uma documentação
  • [x] Integrando com o Travis CI
  • [x] Integrando com o Coveralls
  • [x] Publicando a biblioteca no NPM
  • [x] Adicionando Token para autorização

Section 7 - Refatorando uma biblioteca com testes

  • [ ] Refatorando para Classe/Construtor
  • [ ] Criando método de request no objeto da Classe
  • [ ] Refatorando o método para Albums
  • [ ] Refatorando os métodos de Search
  • [ ] Atualizando Webpack para gerar UMD a partir de Classes

Section 8 - Criando um Player do Spotify

  • [ ] Apresentando o Player Final
  • [ ] Mostrando o Markup Final da Aplicação
  • [ ] Configurando o Webpack-dev-server
  • [ ] Criando o Markup Básico da Aplicação
  • [ ] Importando a Biblioteca do Spotify Wrapper
  • [ ] Criando componente de AlbumList
  • [ ] Adicionando o AlbumList no Layout
  • [ ] Criando componente AlbumInfo
  • [ ] Adicionando AlbumInfo no Layout
  • [ ] Criando componente AlbumTracks
  • [ ] Adicionando AlbumTracks no Layout
  • [ ] Criando método ConvertToHumanTime
  • [ ] Aplicando ConvertToHumanTime no Layout
  • [ ] Criando SearchTrigger
  • [ ] Criando SelectAlbumTrigger
  • [ ] Criando PlaylistTrigger

Section 9 - Criando uma CLI para converter Bitcoin em qualquer moeda

  • [ ] Apresentando a CLI
  • [ ] Editando o package.json
  • [ ] Iniciando a CLI e testes
  • [ ] Conhecendo o Commander
  • [ ] Aprendendo a rodar a CLI localmente
  • [ ] Definindo Options como parâmetros
  • [ ] Utilizando a API para obter dados reais
  • [ ] Tratamento de erros
  • [ ] Colorindo o terminal com Chalk
  • [ ] Adicionando um Loader

Section 10 - Introdução a Testes com React - Criando um Componente Full Header

  • [ ] Introdução ao Storybook, Enzyme e Lyef
  • [ ] Baixando o boilerplate da Lyef
  • [ ] Como Stories Funcionam
  • [ ] Escrevendo stories
  • [ ] Escrevendo primeiro Teste
  • [ ] Adicionando título
  • [ ] Adicionando subtitulo
  • [ ] Adicionando bgColor
  • [ ] Adicionando textColor e font
  • [ ] Adicionando bgImg
  • [ ] Adicionando Estilos
  • [ ] Adicionando Video
  • [ ] Integrando o Componente com o Create-React-App
Updated 20/04/2018 01:19

Span size() broken on GCC > 5.4

Microsoft/GSL

Simple failing case:

std::array<int, 10> array;
gsl::span<int> test1 = gsl::make_span(array);

static gsl::span<int> test2;
test2 = test1;
std::cout << test1.size() << " " << test2.size();

Gives output: 10 0

As far as I’m aware, both spans should point to the same array, with identical size (which in fact happens on gcc-5.4).

This issue occurs only when using different optimization option than -O0 (-Og, -O1, -O2, -O3).

Tested on GCC 6.1, 6.2, 6.3, 7.1, 7.2, 7.3 (from https://godbolt.org/) - issue is identical.

Link to most-tailored case showing problem: https://godbolt.org/g/5u4XbD

A bit more sophisticated issue, showing that only assigning to static span, created earlier causes problem: https://godbolt.org/g/6AoWG3

I have tested where begin() and end() of each span was pointing to - they point at the same addresses, so even when size is incorrectly reported as 0, begin() and end() works fine.

I am aware that gcc >= 6 is not listed in supported platforms, so please close this issue if it is irrelevant.

Updated 19/04/2018 04:05 4 Comments

joining_thread implementation

Microsoft/GSL

Partial fix for issue: https://github.com/Microsoft/GSL/issues/471 Only joining_thread is added. It’s possible to create joining_thread as global object, it’ll behave like detached thread.

https://github.com/isocpp/CppCoreGuidelines/issues/925

I also took into account @hsutter comment from previous attempt: “The main thing is to get raii_thread whose destructor unconditionally joins, which is what std::thread should have done. That part looks fine. Then we can recommend using raii_thread everywhere.” https://github.com/Microsoft/GSL/pull/481

Updated 20/05/2018 10:43 3 Comments

string_span static array constexpr constructor not actually constexpr

Microsoft/GSL

When trying to make a constexpr string_span from a static array, like so:

constexpr gsl::string_span<> str {"asdf"};

VS 2017 gives the errors: error C2131: expression did not evaluate to a constant note: failure was caused by call of undefined function or one not declared 'constexpr' note: see usage of 'gsl::basic_string_span<const char,-1>::remove_z' note: while evaluating 'gsl::basic_string_span<const char,-1>::basic_string_span(&span, &{97,115,100,102,0})' error C2131: expression did not evaluate to a constant note: failure was caused by call of undefined function or one not declared 'constexpr' note: see usage of 'gsl::basic_string_span<const char,-1>::remove_z'

The constructor called here says: // From static arrays - if 0-terminated, remove 0 from the view // All other containers allow 0s within the length, so we do not remove them template <std::size_t N> constexpr basic_string_span(element_type (&arr)[N]) : span_(remove_z(arr)) { }

Since all we really want to do is remove the trailing zero from string literals, it seems like a simpler constructor like so might do what we want and allow for constexpr string spans: // From static arrays - if 0-terminated, remove 0 from the view // All other containers allow 0s within the length, so we do not remove them template <std::size_t N> constexpr basic_string_span(element_type (&arr)[N]) : span_(arr, arr[N - 1] ? N : N - 1) { } remove_z could also be fixed to be correctly constexpr, I suppose.

The comment seems to imply that we don’t care about embedded nulls, so we don’t need to look for the first null on the string, just remove the last one if there is one (string literals always have one). If someone hard-coded a static char array with nulls in it, they’d just have to be aware that a single ending null would be removed, but that’s no worse than the current situation.

Updated 19/04/2018 04:03 1 Comments

not_null pointer type, and unique/shared constructors

Microsoft/GSL

Two questions: - Why does not_null take a pointer type instead of a non-pointer type like span, unique_ptr and shared_ptr. That is:

auto safe_ptr = gsl::not_null<int *>(ptr) // Currently
auto safe_ptr = gsl::not_null<int>(ptr) // Why not this?
  • Is there a reason there is no constructor for unique_ptr / shared_ptr instead of having to use get()?
Updated 02/03/2018 21:00 14 Comments

not_null has converting constructors?

Microsoft/GSL

It seems to me that offering a conversion from T to not_null<T> looses the potential to detect certain bugs at compile-time.

if I have a function that returns a raw (potentially null) pointer, and I carelessly pass it to a function taking not_null it will compile fine, and will try report a bug at run-time when it is likely too late.

Instead, if the constructor from T were explicit, an inadvertent assignment:

use_ptr(make_ptr());

would be impossible, and I would be forced to explicitly require a potentially unsafe conversion:

use_ptr(not_null<T>{make_ptr()});

This would be a kind of the signature: by writing this cast, I am taking the responsibility for guaranteeing that the raw pointer will not be null. If it is not the case, you will know that I did it consciously.

See also CppCoreGuidelines issue: https://github.com/isocpp/CppCoreGuidelines/issues/767

Updated 25/04/2018 08:36 30 Comments

Add find function for string_span

Microsoft/GSL

Maybe I’m missing something, but how does one find a string position in a string_span object?

The only way I found was using std::find, but that returns a iterator, which doesn’t work when using it with the .subspan, .first, .last methods from string_span which requires a int.

Updated 19/04/2018 04:01 2 Comments

not_null and std::function

Microsoft/GSL

Has there been any discussion of having a specialization of not_null for std::function. So not_null<std::function<blah>> would imply the std::function contains some non null function pointer.

Also has not_null been put for standardization?

Updated 13/04/2018 08:34 2 Comments

Suggestion: Guidance for calling non const methods from const via pointers (std::propagate_const, gsl::owner,not_null...)

isocpp/CppCoreGuidelines

The section “Con.2: By default, make member functions const”

States under Enforcement: “Flag a member function that is not marked const, but that does not perform a non-const operation on any member variable.”

Experience with resharper C++ which does this, is unfortunately that it’s often doing more harm than good, because many/most pointer types (smart or plain, owning or not) do not propagate const, which makes resharper suggest possibly dangerously adding const. You all know it,

struct C{
  std::unique_ptr<X> uptr;
  Y* ptr;
  void do(){
    uptr->mutation();
    ptr->mutation();
 }
}

Adding const here becomes as bad as casting away const or making members mutable, and less visible. Also relates to thread safety implications of const.

I found no guidance related to this. A way to deal with this is http://en.cppreference.com/w/cpp/experimental/propagate_const , and something like

template<typename T,D> using cprop_uptr = std::propagate_const<std::unique_ptr<T,D>>

One useful practice (not for all?) is sticking to only const propagating pointer types as pointer members. This may also be an argument for pushing the use of references over non-owning pointers.

This somewhat relates to GSL issue 89: https://github.com/Microsoft/GSL/issues/89 (not_null<unique_ptr<>> doesn't work #89 ) and indirectly to SO question http://stackoverflow.com/questions/33306553/gslnot-nullt-vs-stdreference-wrappert-vs-t

Has const propagation been considered for gsl smart pointers (owner<>, … ) ? Or use operator.() ?

Updated 19/03/2018 15:01 1 Comments

C.131 Avoid trivial getters and setters

isocpp/CppCoreGuidelines

One reason people write trivial getters and setters is to allow some future modifications without changing client code. The note in this item says, “A getter or a setter that converts from an internal type to an interface type is not trivial (it provides a form of information hiding).” A future change might be to change an internal type to a calculated type. Or to log every time the setter is called.

I also see this proposal http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3888.pdf (Herb Sutter is an author), includes getters and setters such as: void set_tolerance(double tolerance); double get_tolerance(); I can’t see the implementation so I don’t know if that’s an internal type. But that’s the point - as a client of this code, I shouldn’t be exposed to whether it’s an internal type or not.

Updated 02/05/2018 19:21 20 Comments

NL.n Use namespaces, do nest your namespaces. Do not use a suffix or prefix in all defined names to provide scope.

isocpp/CppCoreGuidelines

Reason: Provides a narrow context where defined names are short, external names are well marked and also naturally segments your header-files, this makes larger code sets more easy to browse and comprehend and aids with refactoring.

Chances are your IDE provides a folding mechanism for namespaces, which is great when browsing these larger pieces of code.

Examples:

Alternatives:

Exceptions: extern “C”

Enforcement: Lint defined names and suggest shortening of long names, find repeated prefixes.

See also:

Notes: Do not use reversed Internet domain names as namespaces, as java frequently do for package names.

Discussion: Maybe GitHub could be persuaded to provide a global top-namespace allocatioin mechanism ?

Updated 24/05/2018 16:13 23 Comments

SEC-3187: LdapUserDetailsManager password change with LDAP operation (RFC 3062)

spring-projects/spring-security

Mark Janssen (Migrated from SEC-3187) said:

Currently the LdapUserDetailsManager changePassword method modifies the password attribute directly. It would be better to (optionally) use the LDAP Password Modify Extended Operation as described in RFC 3062. This way, any associated attributes (e.g. Samba NTLM hashed passwords) will also be updated by the LDAP server.

Updated 17/05/2018 23:05 6 Comments

Several warnings reported in GSL code by CppCoreCheck tool

Microsoft/GSL

Using the new CppCoreCheck tool on a project containing just a single source file including gsl.h and defining main, I get these warnings:

string_span.h(112): warning C26493: Don't use C-style casts that would perform a static_cast downcast, const_cast, or reinterpret_cast. (type.4: http://go.microsoft.com/fwlink/p/?LinkID=620420)
string_span.h(114): warning C26491: Don't use static_cast downcasts. Use dynamic_cast instead. (type.2: http://go.microsoft.com/fwlink/p/?LinkID=620418)
string_span.h(113): warning C26481: Don't use pointer arithmetic. Use span instead. (bounds.1: http://go.microsoft.com/fwlink/p/?LinkID=620413)
string_span.h(120): warning C26491: Don't use static_cast downcasts. Use dynamic_cast instead. (type.2: http://go.microsoft.com/fwlink/p/?LinkID=620418)
string_span.h(120): warning C26481: Don't use pointer arithmetic. Use span instead. (bounds.1: http://go.microsoft.com/fwlink/p/?LinkID=620413)
string_span.h(125): warning C26493: Don't use C-style casts that would perform a static_cast downcast, const_cast, or reinterpret_cast. (type.4: http://go.microsoft.com/fwlink/p/?LinkID=620420)
string_span.h(126): warning C26491: Don't use static_cast downcasts. Use dynamic_cast instead. (type.2: http://go.microsoft.com/fwlink/p/?LinkID=620418)
string_span.h(126): warning C26481: Don't use pointer arithmetic. Use span instead. (bounds.1: http://go.microsoft.com/fwlink/p/?LinkID=620413)
string_span.h(132): warning C26491: Don't use static_cast downcasts. Use dynamic_cast instead. (type.2: http://go.microsoft.com/fwlink/p/?LinkID=620418)
string_span.h(132): warning C26481: Don't use pointer arithmetic. Use span instead. (bounds.1: http://go.microsoft.com/fwlink/p/?LinkID=620413)
span.h(1254): warning C26495: Variable 'gsl::span<wchar_t const ,-1>::bounds_' is uninitialized. Always initialize a member variable. (type.6: http://go.microsoft.com/fwlink/p/?LinkID=620422)
span.h(1254): warning C26485: Expression 'allotemp.2': No array to pointer decay. (bounds.3: http://go.microsoft.com/fwlink/p/?LinkID=620415)
span.h(626): warning C26495: Variable 'gsl::static_bounds<-1>::m_ranges' is uninitialized. Always initialize a member variable. (type.6: http://go.microsoft.com/fwlink/p/?LinkID=620422)
span.h(356): warning C26481: Don't use pointer arithmetic. Use span instead. (bounds.1: http://go.microsoft.com/fwlink/p/?LinkID=620413)

This is using the current version of GSL and CppCoreCheck available through NuGet (0.01 and 14.0.23107.2 respectively).

I’d expect GSL itself to trigger no warnings :) Early days I know but someone should report it! I’m not sure how valid they are so perhaps they just need suppressing.

Updated 19/04/2018 01:42 3 Comments

finally() mishandles modifiable lvalues

Microsoft/GSL

Meng Zhu pointed this out to me. gsl.h contains:

template <class F>
class final_act
{
[...]
private:
    F f_;
    bool invoke_;
};

// finally() - convenience function to generate a final_act
template <class F>
final_act<F> finally(const F &f) noexcept { return final_act<F>(f); }

template <class F>
final_act<F> finally(F &&f) noexcept { return final_act<F>(std::forward<F>(f)); }

Given a const lvalue of type X, finally(const F&) is selected, deducing F to be X, and it returns final_act<X>.

However, given a modifiable lvalue of type X, finally(F&&) is selected, deducing F to be X&, and it returns final_act<X&>. This appears to be completely undesired.

If final_act<F> assumes that F is an object type, it should static_assert so, and finally() should be fixed accordingly. The most robust fix would be to provide a perfect forwarder only, and use decay.

Lastly, all other occurrences of perfect forwarding in the GSL should be audited for this problem, especially when perfect forwarders are overloaded with anything else of the same arity (perfect forwarders are extremely greedy, and will outcompete other overloads, often unintentionally).

Updated 17/04/2018 21:56 3 Comments

High-level Rules that span many guidelines

isocpp/CppCoreGuidelines

The Core Guidelines advises e.g. using ranged for instead of for, for instead of while, and specialized ranged algorithms instead of either.

It also advises to stagger template definitions, avoid templates unless necessary, etc.

These and others are part of what I call the Rule of Minimum Power:

“Use the least amount of language power that gets the task done.”

Under this specific strategic guideline fall a number of the concrete checkable guidelines. Then programmers seeing e.g.:

file.cpp(475): Rule of Minimum Power: use ranged for instead of explicit for loop.

will immediately understand the high-level motivation.

Updated 24/04/2018 20:11 11 Comments

SES-166: Consider using OpenSAML 2.6.4 (or above)?

spring-projects/spring-security-saml

Thomas Maslen (Migrated from SES-166) said:

If I understand correctly, spring-security-saml2-core (both in 1.0.1.RELEASE and in master) is using OpenSAML 2.6.1 (as 1.0.0.RELEASE did).

That’s not terrible, but there are a couple of fine reasons for moving to OpenSAML 2.6.4 or above (IIRC latest is 2.6.5): - It fixed an XML vulnerability - In the course of doing that it got rid of all the awkward stuff that wanted to have endorsed JARs for some of the XML libraries, so it’s a lot easier now to have e.g. a nice, self-contained WAR file

[OpenSAML 3 has also been released (3.0.0, 3.1.0 and 3.1.1) and OpenSAML 2 may be headed toward legacy status, but the upgrade to 2.6.4+ is easy whereas moving to 3.* may be nontrivial].

[By the way, JIRA lists saml-1.0.0 and saml-1.0.1 under “Unreleased versions”]

Updated 30/03/2018 16:25 49 Comments

SEC-2856: Make cookie theft detection in remember-me service configurable because it's seriously broken

spring-projects/spring-security

Jean-Pierre Bergamin (Migrated from SEC-2856) said:

After enabling remember-me authentication for our SSO portal, people were complaining about errors they got while logging in. Those errors turned out to be CookieTheftExceptions.

After investigating quite intensively how these exceptions occured, we found that there are so many regular usecases how this can happen that this feature can be considered as really broken.

h5. Usecase 1 - Open two windows in your browser and login to the remember-me enabled web app in both windows - Close the browser - Open the browser (with the setting to re-open all previous windows) - Both windows get re-opened and both send almost simultaneously a request with the same remember-me cookie to the web app - The first request succeeds, where the second one fails (because the first already consumes the cookie) and the user is logged out

h5. Usecase 2 - Log in to the remember-me enabled web-app - Close the browser - Open the browser and visit the web-app again, which triggers a remember-me authentication - The remember-me authentication takes a while (e.g. because the AD-Server responds very slowly) and the user closes the tab - The user visits the web-app again after a while and gets a CookieTheftException and is logged out

The problem here is that the browser never got the response with the updated cookie back because the user closed the tab before.

h5. Usecase 3 - Open your remember-me enabled web-app in Chrome - Close the browser - Start entering the URL of your web-app in Chrome’s address bar and hit enter - You get a CookieTheftException and are logged out

What happens here is that Chrome already sends a request in the background while entering the URL. When hitting enter before the background request returned with a new cookie in its response, a second request with the same cookie is sent again - which leads to a CookieTheftException.

h5. Usecase 4 - The remember-me enabled web-app is an SSO (single sign-on) application where people authenticate for different other web-apps - Open different web-apps which use the SSO in different tabs - Close the browser - Open the browser again (with the setting to re-load all previous tabs) - The different web-apps in the different tabs need to re-login with the SSO app and immediately redirect to it after loading - You get a CookieTheftException and are logged out

The problem here is that all webapps redirect to the SSO app and query it almost simultaneously which leads to the CookieTheftException.

As you can see, this CookieTheftException detection makes more harm than it tries to resolve. The PersistentTokenBasedRememberMeServices should have a way to disable the cookie theft detection on demand.

Currently we “disable” the cookie theft detection by always returning a constant token data like:

public class CustomPersistentTokenBasedRememberMeServices extends PersistentTokenBasedRememberMeServices {
    public CustomPersistentTokenBasedRememberMeServices(String key, UserDetailsService userDetailsService, PersistentTokenRepository tokenRepository) {
        super(key, userDetailsService, tokenRepository);
    }

    @Override
    protected String generateTokenData() {
        // Return a constant value for the token value to avoid CookieTheftExceptions.
        return "U1WUsKXNkM0Jzpozau/BeQ==";
    }
}

The PersistentTokenBasedRememberMeServices class should be configurable to have cookie theft detection turned on or off.

Updated 26/04/2018 17:50 5 Comments

SES-159: Single Logout Problems with Logout Request Issued by the IDP.

spring-projects/spring-security-saml

Hubert Wagener (Migrated from SES-159) said:

SingleLogout is not functional.

Logout requests issued by the IDP fail.

More verbose: Consider in the SingleLogout the IDP sent a logout request like

<?xml version="1.0" encoding="UTF-8"?>
<saml2p:LogoutRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://localhost:8080/security-sso/saml/SingleLogout" ID="ejbloofedgbpinebbeioijllbigpobecghaajlkd" IssueInstant="2015-02-02T10:20:16.090Z" NotOnOrAfter="2015-02-02T10:25:16.090Z" Reason="urn:oasis:names:tc:SAML:2.0:logout:user" Version="2.0">
  <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">
    https://localhost:9443/samlsso
  </saml2:Issuer>
  <saml2:NameID xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">
    demo@xxx.de
  </saml2:NameID>
  <saml2p:SessionIndex>
    fd011a38-32bb-48eb-9a59-253b5ddf531f
  </saml2p:SessionIndex>
</saml2p:LogoutRequest>  

In SAMLLogoutProcessingFilter.processLogout(..) the credential are computed as

Authentication auth = SecurityContextHolder.getContext().getAuthentication();
SAMLCredential credential = null;
      if (auth != null) {
              credential = (SAMLCredential) auth.getCredentials();
      }

Actually I don’t understand how (and where) the credentials of the user “ demo@xxx.de” are (or should be) put into the security context when called from the IDP like given above.

What happens is: The logout request fails with an exception (due to null credential) thrown at:

SingleLogoutProfileImpl.processLogoutRequest(…)

...
// Check whether any user is logged in
        if (credential == null) {
            throw new SAMLStatusException(StatusCode.UNKNOWN_PRINCIPAL_URI, "No user is logged in");
        }

Sure the session of the user should be destroyed, but I don’t see where this case is considered in the code. Can you please help in understanding?

Updated 09/04/2018 12:45 9 Comments

LDAP-310: Log LDAP queries generated by spring-ldap

spring-projects/spring-ldap

Jose Martinez (Migrated from LDAP-310) said:

I would be useful for the debugging purposes to have log the final query string sent to the server as well as the parameters. Something we can copy-paste into the LDAP server and see how it runs. Similar to the way JdbcTemplate shows the queries and parameters executing a query.

I’m creating this Jira as per the following StackOverflow post: https://stackoverflow.com/questions/24061834/how-to-see-the-query-generated-by-spring-ldaptemplate.

Updated 06/04/2018 20:07 6 Comments

SEC-2680: Fire an event when logout has finished

spring-projects/spring-security

Marten Deinum (Migrated from SEC-2680) said:

During login several events can be fired like for instance AuthenticationSuccessEvent and AuthenticationFailureExpiredEvent. It would be nice that on a logout (successful, session limit exceeded etc.) also an event would be fired.

This would enable to create an ApplicationListener which logs the start/end of a user session.

Updated 18/03/2018 18:39 3 Comments

SEC-2620: Make CachingUserDetailsService constructor public for easy use in Java Config

spring-projects/spring-security

Marten Deinum (Migrated from SEC-2620) said:

Trying to configure caching for anything else then the jdbcAuthentication() is painful. Where ldap caching is easily configured in XML that feature is (currently) not available in Java Config (at least I couldn’t find it).

However to make caching configuration easier it would be nice if the CachingUserDetailsService could be made constructable from outside the package (maybe move to another package?). That way overriding the userDetailsService() method from the WebSecurityConfigurerAdapter would allow easy wrapping of the used UserDetailsService with caching

@Override
    protected UserDetailsService userDetailsService() {
        UserDetailsService delegate = super.userDetailsService();
        CachingUserDetailsService userDetailsService = new CachingUserDetailsService(delegate);
        userDetailsService.setUserCache(userCache());
        return userDetailsService;
    }

That way every UserDetailsService can be made cacheable without having to expose userCache methods for each configurer.

Updated 18/03/2018 10:24 3 Comments

SEC-2427: Subsequent requests from the same browser break remember me function and throws CookieTheftException

spring-projects/spring-security

Vertonur Sunimi (Migrated from SEC-2427) said:

Prerequisite: Browser with authenticated rememberme cookie stored.

Reproduction steps: 1. The browser open a page to trigger auto login. 2. Request received by server and processed right before code tokenRepository.updateToken(newToken.getSeries(), newToken.getTokenValue(), newToken.getDate()); of PersistentTokenBasedRememberMeServices and the executing thread paused. 3. End user refresh the page and a second request is sent to the server 4. The second request is recieved and processed through the Spring Security filters and returned a new cookie to the browser and the token( token-A) in the db is updated either. 5. The first request resumed and run code updateToken thus the db is updated with the new generated token (token-B). As the request has been canceled by the browser so token-B will never reach the browser with code addCookie(newToken, request, response); 6. Session of the end user time out and pages are requested again, browser send request s with token-A 7. !presentedToken.equals(token.getTokenValue()) of PersistentTokenBasedRememberMeServices is checked thus caused CookieTheftException be thrown and all tokens related to the end user in db are deleted.

SO concurrency control is needed for rememberme filter.

Updated 22/05/2018 10:42 3 Comments

SEC-2379: add support for ACL filtered SQL pagination with Hibernate or JPA

spring-projects/spring-security

Thomas Koch (Migrated from SEC-2379) said:

I’ve a model class supported by Hibernate/JPA with row level security and a PagingAndSortingRepository interface for this model. I want to call findAll(pageable) on this repository and get a list of only those model instances to which the current principal has read access to.

The method should not be unnecessarily slow or waste resources. This might mean that the ACL filtering should be done by the database.

All features of Spring Security ACL should still be supported, in particular hierarchic ACL. The later should be possible with recursive query evaluation.

Updated 22/05/2018 08:19 6 Comments

SEC-2363: Re-write Spring Security documentation

spring-projects/spring-security

Rob Winch (Migrated from SEC-2363) said:

NOTE Requirements are still in progress

h1. Requirements

The new documentation should: - Consult online resources for how to write it. A few examples * http://jacobian.org/writing/great-documentation/ * http://stevelosh.com/blog/2013/09/teach-dont-tell/ * http://opensource.com/tags/doc-dish - Be task focused * Contain XML and Java Configuration versions ** Be tested (i.e. include snippets from Tested code) - Contain a Architecture section that describes how things work together - Include documentation in the Javadoc that is tested. We can use ascidoclet

h1. Approximate outline?

Starting out the outline looks something like this: - What is Spring Security * Should contain link to Hello World for those wanting to start now * Should contain link to What’s New - What’s New - Community - Java Configuration * Hello World * Authentication * In Memory * JDBC * LDAP * Remember Me * CAS * OpenID * Custom * UserDetailsService * Authentication Provider * AuthenticationManager * Authorization * Web Authorization * Security Response Headers * CSRF * Method Security - XML Configuration * … same sections as Java Configuration … - Architecture * Accessing the current user - Appendix * XML Namespace * Java Configuration ** Dependencies

Updated 09/03/2018 22:33 2 Comments

Fork me on GitHub