- Describe what you want to achieve.
I want to do the following:
json* my_jptr;
(*my_jptr) = json({});
But when I attempt this I get this error:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000408eb9 in std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<nlohmann::detail::value_t> >, std::is_move_constructible<nlohmann::detail::value_t>, std::is_move_assignable<nlohmann::detail::value_t> >::value, void>::type std::swap<nlohmann::detail::value_t>(nlohmann::detail::value_t&, nlohmann::detail::value_t&) ()
I tried this:
json* my_jptr;
(*my_jptr) = json({});
- Describe which system (OS, compiler) you are using.
Version of g++
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --disable-werror --with-gxx-include-dir=/usr/include/c++/9 --enable-ssp --disable-libssp --disable-libvtv --disable-cet --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-9 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 9.2.1 20190820 [gcc-9-branch revision 274748] (SUSE Linux)
openSUSE Tumbleweed.
- Describe which version of the library you are using (release version, develop branch).
I am using 3.7.0 of this library.
I want to do the following:
But when I attempt this I get this error:
I tried this:
Version of g++
openSUSE Tumbleweed.
I am using 3.7.0 of this library.