Git Product home page Git Product logo

ustl's Introduction

uSTL

This library is obsolete. Please use the official gcc C++ standard library.

uSTL is a partial implementation of the C++ standard library that focuses on decreasing the memory footprint of user executables. While some projects can use it to replace the standard library without any code changes, there exist important differences that you should be aware of. Please read documentation in docs/index.html before using this library in your project.

Then, after you've read it, consider whether you really want to make your project depend on a nonstandard standard library to get almost nothing for the trouble. uSTL is no longer significantly smaller than the standard library, but continues to have numerous incompatibilities that were required to get those space savings twenty years ago. So when I ask you to just use the standard library, I really do mean it!

Installation

The only dependency is a C++ compiler, gcc 5 or clang 3.6. Build configuration is in Config.mk and config.h, generated by configure. configure --help will list available configuration options.

./configure --prefix=/usr
make
make check
make install

Use

Here's a simple hello world application:

#include <ustl.h>
using namespace ustl;

int main (void)
{
    cout << "Hello world!\n";
    return EXIT_SUCCESS;
}

Compile the sources with g++, but link the executable with gcc. g++ will link with -lstdc++ by default, but to use uSTL you need to link with -lustl -lsupc++ instead. The right way to get this list of libraries is to use pkg-config --libs ustl. The pkg-config description file for uSTL is installed if you have pkg-config on your system.

Bugs

Report bugs on the github issue tracker

ustl's People

Contributors

cicku avatar ivas avatar jwakely avatar mingodad avatar msharov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ustl's Issues

class ifstream can leak file descriptor

Hello !
I'm looking at class ifstream definition and I can't see a destructor that takes care of closing the underlying file descriptor if it goes out of scope.

Cheers !

array class should be an aggregate type

That's at least how it's defined by the standard (c++ 11 where it was introduced first)
In this case constructors should be eliminated:
like
array (const array<T2,N>& v) { copy_n (v.begin(), N, _v); }

Being an aggregate allows us initialization like std::array<int. 2> x = {1, 2} -- which is not possible right now
Of course default 0 initialization would not happen with this change anymore, and array would behave in this regard as basic types

ustl::list::splice bug

Hello !
I noticed that ustl::list::splice method has a misspell bug (probably it was never used):

/// Moves the range [first, last) from \p l to this list at \p ip.
template <typename T>
void list<T>::splice (iterator ip, list<T>& l, iterator first, iterator last)
{
    if (!first)
    first = l.begin();
    if (!last)
    last = l.end();
    l.insert (ip, first, last); <<<<<<< here it was missing "l."
    l.erase (first, last);
}

Cheers !

error :(

make

Compiling bktrace.cc ...
In file included from ulimits.h:7:0,
from bktrace.h:7,
from bktrace.cc:6:
utypes.h:12:6: error: #error "This library requires standard UNIX headers to compile."
#error "This library requires standard UNIX headers to compile."
^
make: *** [.o/bktrace.o] Error 1

Version 2.3 build issues

Also I cannot build v2.3 on Fedora 23 amd64 (gcc 5.3.1):

    Compiling unew.cc ...
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -Wextra -Woverloaded-virtual -Wpointer-arith -Wshadow -Wredundant-decls -Wcast-qual -std=c++14  -I/home/mock/rpmbuild/BUILDROOT/ustl-2.3-1.fc23.denf.x86_64/usr/include -fPIC -MMD -MT "unew.s .o/unew.o" -o .o/unew.o -c unew.cc
unew.cc:20:1: error: expected '}' at end of input
 }
 ^
Makefile:50: recipe for target '.o/unew.o' failed
make: *** [.o/unew.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from sistream.h:7:0,
                 from ofstream.h:7,
                 from ofstream.cc:6:
mistream.h: In member function 'void ustl::ustl::istream::iread(T&)':
mistream.h:235:43: error: must #include <typeinfo> before using typeid
     if (!verify_remaining ("read", typeid(v).name(), sizeof(T)))
                                           ^
In file included from sistream.h:8:0,
                 from ofstream.h:7,
                 from ofstream.cc:6:
ustring.h: At global scope:
ustring.h:54:21: error: 'reverse_iterator' in namespace 'ustl' does not name a template type
     typedef ::ustl::reverse_iterator<iterator>  reverse_iterator;
                     ^
ustring.h:55:21: error: 'reverse_iterator' in namespace 'ustl' does not name a template type
     typedef ::ustl::reverse_iterator<const_iterator> const_reverse_iterator;
                     ^
ustring.h:83:12: error: invalid use of template-name 'ustl::ustl::reverse_iterator' without an argument list
     inline reverse_iterator rbegin (void)   { return reverse_iterator (end()); }
            ^
ustring.h:84:10: error: 'const_reverse_iterator' does not name a type

Any plans for regular expression ?

Hello !
The ustl idea is nice and I noticed that it doesn't come with any kind of regular expression facility builtin, any plan to add one ?

Something like the lua regular expressions or peg/leg ?

Cheers !

On debian/ubuntu configure fail

Hello !
On debian/ubuntu the "configure" script can not detect existence of:
// Define to 1 if you have the <sys/stat.h> header file.

undef HAVE_SYS_STAT_H

// Define to 1 if you have the <sys/types.h> header file.

undef HAVE_SYS_TYPES_H

I need to manually set then.

Cross-compiling not working

I am trying to cross-compile uSTL for a Xilinx Zynq development board (ARM processor). The ./configure script claims to be able to cross-compile, but I don't see any of the hooks actually in there.

The command ./configure --with-demangler --force-inline --with-libstdc++ --without-mmx --host=arm-xilinx-linux-gnueabi still builds for the host and never tried to run arm-xilinx-linux-gnueabi-gcc, etc.

It looks like the configure script builds and executes a config.cpu program, which is something that wouldn't work if cross-compiling. The cross-compile library does offer sys/config/h, etc, to parse for capabilities.

Make check issue with the current branch

Got a small problem while testing the current snapshot:

$ ./configure
$ make
    Linking inplace header location ...
    Compiling sostream.cc ...
    ...
Linking libustl.so.2.3 ...

$ make check
mkdir: cannot create directory '.o/bvt': File exists
bvt/Module.mk:50: recipe for target '.o/bvt/.d' failed
make: *** [.o/bvt/.d] Error 1

Memory leak in string ?

Hello !
Executing the bvt/* programs through valgrind I found a reported leak on bvt/bvt07.cpp and narrowed it down to the program bellow, if instead of "string s2 (VectorRange(c_TestString2)-1);" we do "string s2 (c_TestString2);" no leak is reported.

Cheers !

#include "ustl.h"
using namespace ustl;

int main(int argc, char *argv[])
{
    static const char c_TestString2[] = "abcdefghijklmnopqrstuvwxyz";
    string s2 (VectorRange(c_TestString2)-1);
    //string s2 (c_TestString2);
    cout << s2 << endl;
    s2.unlink();

    return 0;
}
==23522== 
==23522== HEAP SUMMARY:
==23522==     in use at exit: 72,731 bytes in 2 blocks
==23522==   total heap usage: 5 allocs, 3 frees, 85,019 bytes allocated
==23522== 
==23522== 27 bytes in 1 blocks are definitely lost in loss record 1 of 2
==23522==    at 0x4C2C857: malloc (vg_replace_malloc.c:291)
==23522==    by 0x4C2C9CB: realloc (vg_replace_malloc.c:687)
==23522==    by 0x402CCF: ustl::memblock::reserve(unsigned long, bool) (memblock.cc:94)
==23522==    by 0x4029C9: ustl::memblock::resize(unsigned long, bool) (memblock.cc:33)
==23522==    by 0x40A255: ustl::string::resize(unsigned long) (ustring.cc:54)
==23522==    by 0x40A2DE: ustl::string::assign(char const*, unsigned long) (ustring.cc:69)
==23522==    by 0x401A96: ustl::string::assign(char const*, char const*) (ustring.h:112)
==23522==    by 0x401AFF: ustl::string::string(char const*, char const*) (ustring.h:250)
==23522==    by 0x4018B4: main (bvt072.cc:12)
==23522== 
==23522== LEAK SUMMARY:
==23522==    definitely lost: 27 bytes in 1 blocks
==23522==    indirectly lost: 0 bytes in 0 blocks
==23522==      possibly lost: 0 bytes in 0 blocks
==23522==    still reachable: 72,704 bytes in 1 blocks
==23522==         suppressed: 0 bytes in 0 blocks
==23522== Reachable blocks (those to which a pointer was found) are not shown.
==23522== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==23522== 
==23522== For counts of detected and suppressed errors, rerun with: -v
==23522== ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)

Date & Time missing

Hello !
Date & time is used on most applications and there is nothing of it on ustl.
Is it planed to implement it ?

Also network (even a thin abstraction over libcurl) and regular expressions.

Cheers !

Linking on Fedora 22

After figuring out that Debian based distributions aren't supported out of the box without some workarounds I installed Fedora 22 in a VM. I installed the ustl as advised in the documentation. (In the end I would like to use a different prefix, however at first I just wanted to get it working.)
With this setup compiling the hello world example from the doc works fine, however I can't get it to link properly.

[gery@localhost ~]$ gcc -lustl main.cpp
/usr/local/lib/libustl.so: undefined reference to __cxa_end_catch' /usr/local/lib/libustl.so: undefined reference to__cxa_allocate_exception'
/usr/local/lib/libustl.so: undefined reference to typeinfo for unsigned char' /usr/local/lib/libustl.so: undefined reference totypeinfo for long'
/usr/local/lib/libustl.so: undefined reference to typeinfo for unsigned int' /usr/local/lib/libustl.so: undefined reference totypeinfo for char const*'
/usr/local/lib/libustl.so: undefined reference to __gxx_personality_v0' /usr/local/lib/libustl.so: undefined reference to__cxa_begin_catch'
/usr/local/lib/libustl.so: undefined reference to __cxa_throw' /usr/local/lib/libustl.so: undefined reference tovtable for __cxxabiv1::__si_class_type_info'
/usr/local/lib/libustl.so: undefined reference to typeinfo for unsigned long' /usr/local/lib/libustl.so: undefined reference totypeinfo for char'
/usr/local/lib/libustl.so: undefined reference to vtable for __cxxabiv1::__class_type_info' /usr/local/lib/libustl.so: undefined reference tovtable for __cxxabiv1::__vmi_class_type_info'
collect2: Fehler: ld gab 1 als Ende-Status zurück

Implement std::stoi, std::stol, std::stoll

Hello !
It would be nice to have on ustl. llvm libcxx https://github.com/llvm-mirror/libcxx has a license similar to ustl and probably can use their implementation here.

int                stoi  (const string& str, size_t* idx = 0, int base = 10);
long               stol  (const string& str, size_t* idx = 0, int base = 10);
unsigned long      stoul (const string& str, size_t* idx = 0, int base = 10);
long long          stoll (const string& str, size_t* idx = 0, int base = 10);
unsigned long long stoull(const string& str, size_t* idx = 0, int base = 10);

float       stof (const string& str, size_t* idx = 0);
double      stod (const string& str, size_t* idx = 0);
long double stold(const string& str, size_t* idx = 0);

string to_string(int val);
string to_string(unsigned val);
string to_string(long val);
string to_string(unsigned long val);
string to_string(long long val);
string to_string(unsigned long long val);
string to_string(float val);
string to_string(double val);
string to_string(long double val);

Cheers !

Can't build ustl on OS X Yosemite

Hello !
I'm trying to build ustl on OS X Yosemite and the configure script do not give any error but the generated files are not completely transformed and it doesn't compile:

################ Build options #######################################

NAME        := ustl
MAJOR       := 2
MINOR       := 2

#DEBUG      := 1
BUILD_SHARED    := 1
#BUILD_STATIC   := 1
NOLIBSTDCPP := 1

################ Programs ############################################

CXX     := g++
LD      := g++
AR      := ar
RANLIB      := ranlib
DOXYGEN     := doxygen
INSTALL     := install

INSTALLDATA := ${INSTALL} -D -p -m 644
INSTALLLIB  := ${INSTALLDATA}
RMPATH      := rmdir -p --ignore-fail-on-non-empty

################ Destination #########################################

INCDIR      := /usr/local/include
LIBDIR      := /usr/local/lib

################ Compiler options ####################################

WARNOPTS    := -Wall -Wextra -Woverloaded-virtual -Wpointer-arith\
        -Wshadow -Wredundant-decls -Wcast-qual -Wno-long-double
TGTOPTS     := @PROCESSOR_OPTS@ @CUSTOMINCDIR@
INLINEOPTS  := @INLINE_OPTS@

CXXFLAGS    := ${WARNOPTS} ${TGTOPTS} -fPIC
LDFLAGS     := @CUSTOMLIBDIR@
LIBS        :=
ifdef DEBUG
    CXXFLAGS    += -O0 -g
    LDFLAGS += -rdynamic
else
    CXXFLAGS    += -Os -g0 -DNDEBUG=1 -fomit-frame-pointer ${INLINEOPTS}
    LDFLAGS += -s -Wl,-gc-sections
endif
ifdef NOLIBSTDCPP
    LD      := /usr/bin/gcc
    STAL_LIBS   := @libsupc++@ @libgcc_eh@ @libSystemStubs@
    LIBS    := ${STAL_LIBS}
endif
BUILDDIR    := /tmp/xxxx/make/${NAME}
O       := .o/

slib_lnk    = lib$1.dylib
slib_son    = lib$1.dylib.${MAJOR}
slib_tgt    = lib$1.dylib.${MAJOR}.${MINOR}
slib_flags  = -Wl,-single_module -compatibility_version 1 -current_version 1 -install_name $1 -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.4

Output of config.sed:

cat config.sed 
s/ \?@INLINE_OPTS@//g
s/ \?@libgcc_eh@//g
s/#undef \(HAVE_LONG_LONG\)/#define \1 1/g
s/#undef \(SIZE_OF_LONG_LONG\)/#define \1 8/g
s/#undef \(SIZE_T_IS_LONG\)/#define \1 1/g
s/#undef \(HAVE_VECTOR_EXTENSIONS\)/#define \1 1/g
s/@BYTE_ORDER@/LITTLE_ENDIAN/g
s/#undef \(RETSIGTYPE\)/#define \1 void/g
s/#undef const/\/\* #define const \*\//g
s/#undef inline/\/\* #define inline __inline \*\//g
s/#undef off_t/\/\* typedef long off_t; \*\//g
s/#undef size_t/\/\* typedef long size_t; \*\//g
s/#undef \(SIZE_OF_CHAR\)/#define \1 1/g
s/#undef \(SIZE_OF_SHORT\)/#define \1 2/g
s/#undef \(SIZE_OF_INT\)/#define \1 4/g
s/#undef \(SIZE_OF_LONG\)/#define \1 8/g
s/#undef \(SIZE_OF_POINTER\)/#define \1 8/g
s/#undef \(SIZE_OF_SIZE_T\)/#define \1 8/g
s/#undef \(LSTAT_FOLLOWS_SLASHED_SYMLINK\)/#define \1 1/g
s/ \?@PROCESSOR_OPTS@/ -std=c++11 -march=native/g
s/#undef \(HAVE_THREE_CHAR_TYPES\)/#define \1 1/g
s/ \?@libgcc_eh@//g
    s/@SYSWARNS@/-Wno-long-double/g
    s/lib$1.so/lib$1.dylib/g
    s/lib$1.so.${MAJOR}.${MINOR}.${BUILD}/lib$1.${MAJOR}.${MINOR}.${BUILD}.dylib/g
    s/lib$1.so.${MAJOR}.${MINOR}/lib$1.${MAJOR}.${MINOR}.dylib/g
    s/lib$1.so.${MAJOR}/lib$1.${MAJOR}.dylib/g
    s/@SHBLDFL@/-Wl,-single_module -compatibility_version 1 -current_version 1 -install_name $1 -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.4/g
s/#undef \(SIZE_OF_BOOL\)/#define \1 SIZE_OF_LONG/g
s/ \?-mfpmath=sse//g
s/#define \(HAVE_STRSIGNAL\) 1/#undef \1/g
s/@prefix@/\/usr\/local/g
s/@bindir@/\/usr\/local\/bin/g
s/@datadir@/\/usr\/local\/share/g
s/@sysconfdir@/\/usr\/local\/etc/g
s/@localstatedir@/\/usr\/local\/var/g
s/@includedir@/\/usr\/local\/include/g
s/@oldincludedir@/\/usr\/include/g
s/@docdir@/\/usr\/local\/share\/doc\/ustl/g
s/@libdir@/\/usr\/local\/lib/g
s/@localedir@/\/locale/g
s/@mandir@/\/man/g
s/@builddir@/\/tmp\/mingo\/make/g
s/@gccincludedir@/\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/..\/lib\/clang\/6.1.0\/include/g
s/@gcclibdir@/\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/bin\/..\/lib\/clang\/6.1.0\/lib/g
s/@customincdir@/\/usr\/local\/include/g
s/@customlibdir@/\/usr\/local\/lib/g
s/ \?@CUSTOMINCDIR@//g;s/ \?@CUSTOMLIBDIR@//g
s/#undef \(HAVE_ASSERT_H\)/#define \1 1/
s/#undef \(HAVE_CTYPE_H\)/#define \1 1/
s/#undef \(HAVE_ERRNO_H\)/#define \1 1/
s/#undef \(HAVE_FCNTL_H\)/#define \1 1/
s/#undef \(HAVE_FLOAT_H\)/#define \1 1/
s/#undef \(HAVE_INTTYPES_H\)/#define \1 1/
s/#undef \(HAVE_LIMITS_H\)/#define \1 1/
s/#undef \(HAVE_STDIO_H\)/#define \1 1/
s/#undef \(HAVE_LOCALE_H\)/#define \1 1/
s/#undef \(HAVE_ALLOCA_H\)/#define \1 1/
s/#undef \(HAVE_SIGNAL_H\)/#define \1 1/
s/#undef \(HAVE_STDARG_H\)/#define \1 1/
s/#undef \(HAVE_STDDEF_H\)/#define \1 1/
s/#undef \(HAVE_SYS_STAT_H\)/#define \1 1/
s/#undef \(HAVE_SYS_TYPES_H\)/#define \1 1/
s/#undef \(HAVE_STDINT_H\)/#define \1 1/
s/#undef \(HAVE_STDLIB_H\)/#define \1 1/
s/#undef \(HAVE_STRING_H\)/#define \1 1/
s/#undef \(HAVE_TIME_H\)/#define \1 1/
s/#undef \(HAVE_UNISTD_H\)/#define \1 1/
s/#undef \(HAVE_MATH_H\)/#define \1 1/
s/#undef \(HAVE_STDLIB_H\)/#define \1 1/
s/#undef \(HAVE_SYS_MMAN_H\)/#define \1 1/
s/#undef \(HAVE_EXECINFO_H\)/#define \1 1/
s/ \?@libsupc++@//g
s/ \?@libgcc_eh@//g
s/ \?@libSystemStubs@//g
s/@CC@/\/usr\/bin\/gcc/g
s/@CC@/gcc/g
s/@CC@/\/usr\/bin\/gcc/g
s/@CC@/clang/g
s/@CC@/\/usr\/bin\/gcc/g
s/@CC@/cc/g
s/@CXX@/g++/g
s/@CXX@/clang++/g
s/@CXX@/c++/g
s/@DOXYGEN@/doxygen/g
s/@LD@/ld/g
s/@AR@/ar/g
s/@RANLIB@/ranlib/g
s/@RANLIB@/touch/g
s/@INSTALL@/install/g
s/@CC@/gcc/g
s/@CC@/clang/g
s/@CC@/cc/g
s/@CXX@/g++/g
s/@CXX@/clang++/g
s/@CXX@/c++/g
s/@DOXYGEN@/doxygen/g
s/@LD@/ld/g
s/@AR@/ar/g
s/@RANLIB@/ranlib/g
s/@RANLIB@/touch/g
s/@INSTALL@/install/g
s/ \?@CXXFLAGS@//g
s/ \?@LDFLAGS@//g
s/@PKG_NAME@/ustl/g
s/@PKG_VERSION@/0x220/g
s/@PKG_VERSTR@/v2.2-20-ge808197/g
s/@PKG_STRING@/ustl v2.2-20-ge808197/g
s/@PKG_UNAME@/USTL/g
s/@PKG_BUGREPORT@/Mike Sharov <[email protected]>/g
s/@PKG_MAJOR@/2/g
s/@PKG_MINOR@/2/g

The compiler:

gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Cheers !

segmentation fault in ustl replace algorithm

Hi, please help to solve that issue or give your recomendations.

#ifdef USE_USTL
#include <ustl.h>
#define STL ustl
#else
#include <string>
#include <algorithm>
#include <iostream>
#define STL std
#endif //USE_USTL

#include <string.h> //strlen

#define PRINT(X) STL::cout<<X<<STL::endl
int main()
{
    char Str[]="test";
    PRINT("char * testing: "<<Str);
    STL::replace(Str,Str+strlen(Str),'t','z');
    PRINT("char * testing: "<<Str);

    STL::string Strng="test";
    PRINT("string testing: "<<Strng);
    STL::replace(Strng.begin(),Strng.end(),'t','z');
    PRINT("string testing: "<<Strng);
}

$ g++ replace.cxx -o replace.x
$ ./replace.x
char * testing: test
char * testing: zesz
string testing: test
string testing: zesz
$ g++ replace.cxx -DUSE_USTL -lustl -o replace.x
$ ./replace.x
char * testing: test
char * testing: zesz
string testing: test
Ошибка сегментирования (core dumped)

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

clang c++14 on c++11 warning

Hello !
Trying to compile unrolled_list and using clang because it gives better error messages for it, there is this warning mesages:

In file included from performance.cpp:21:
In file included from /usr/local/include/ustl.h:7:
In file included from /usr/local/include/ustl/uspecial.h:7:
In file included from /usr/local/include/ustl/uvector.h:7:
In file included from /usr/local/include/ustl/memblock.h:7:
In file included from /usr/local/include/ustl/memlink.h:8:
In file included from /usr/local/include/ustl/ualgo.h:9:
/usr/local/include/ustl/umemory.h:198:58: warning: use of this statement
      in a constexpr function is a C++14 extension [-Wc++14-extensions]
    inline constexpr reference  operator* (void) const          { assert (ge...
                                                                  ^
/usr/include/assert.h:89:3: note: expanded from macro 'assert'
  ((expr)                                                               \
  ^
In file included from performance.cpp:21:
In file included from /usr/local/include/ustl.h:7:
In file included from /usr/local/include/ustl/uspecial.h:7:
In file included from /usr/local/include/ustl/uvector.h:7:
In file included from /usr/local/include/ustl/memblock.h:7:
In file included from /usr/local/include/ustl/memlink.h:8:
In file included from /usr/local/include/ustl/ualgo.h:9:
/usr/local/include/ustl/umemory.h:199:57: warning: use of this statement
      in a constexpr function is a C++14 extension [-Wc++14-extensions]
    inline constexpr pointer    operator-> (void) const         { assert (ge...
                                                                  ^
/usr/include/assert.h:89:3: note: expanded from macro 'assert'
  ((expr)                                                               \
  ^
In file included from performance.cpp:21:
In file included from /usr/local/include/ustl.h:7:
In file included from /usr/local/include/ustl/uspecial.h:7:
In file included from /usr/local/include/ustl/uvector.h:7:
In file included from /usr/local/include/ustl/memblock.h:7:
In file included from /usr/local/include/ustl/memlink.h:8:
In file included from /usr/local/include/ustl/ualgo.h:9:
/usr/local/include/ustl/umemory.h:200:62: warning: use of this statement
      in a constexpr function is a C++14 extension [-Wc++14-extensions]
    inline constexpr reference  operator[] (size_t i) const     { assert (ge...
                                                                  ^
/usr/include/assert.h:89:3: note: expanded from macro 'assert'
  ((expr)                                                               \
  ^

ustl streams performance

Hello !
Now that ustl have a minimal streams working I did a comparison with the c++ std on ubuntu 14.04, it reads a csv file of 915254KB and write it to another file line by line, ustl performance is around 8 times slower (800%) than std, memory usage ustl 900KB and std 1.5MB:

std -> time ./clean-nl-inquotes 
ted-contracts-2012.csv
Hello world! Alvarez

real    0m9.787s
user    0m1.829s
sys 0m2.443s
ustl -> time ./clean-nl-inquotes 
ted-contracts-2012.csv
Hello world! Alvarez

real    1m7.993s
user    0m57.783s
sys 0m5.515s
#define USE_STD2
#ifdef USE_STD
    #include <string>
    #include <iostream>
    #include <fstream>
    #include <sstream>
    #include <algorithm>
    namespace ustd = std;
#else
    #include <ustl.h>
    namespace ustd = ustl;
#endif

#include <dirent.h>
#include <errno.h>

bool startsWith(const ustd::string& s, const ustd::string& preffix)
{
    return s.size() >= preffix.size() && s.find(preffix) == 0;
}

bool endsWith(const ustd::string& s, const ustd::string& suffix)
{
    return s.size() >= suffix.size() && s.rfind(suffix) == (s.size()-suffix.size());
}

class OsDir
{
    DIR *m_dirp;
public:
    OsDir(){m_dirp = NULL;};
    ~OsDir(){close();}
    bool open(const char *root)
    {
        m_dirp = opendir(root);
        return m_dirp != NULL;
    }
    void close()
    {
        if(m_dirp)
        {
            closedir(m_dirp);
            m_dirp = NULL;
        }
    }
    struct dirent *readdir()
    {
        return m_dirp ? ::readdir(m_dirp) : NULL;
    };
};


int main()
{
    struct dirent *pde;
    OsDir dir;
    dir.open(".");

    while ((pde = dir.readdir())) {
            ustd::string fname = pde->d_name;
            if(endsWith(fname, ".csv"))
            {
                ustd::cout << fname << ustd::endl;
                //ustd::ifstream fd_in(fname, ustd::ios::in);
                ustd::ifstream fd_in;
                //fd_in.set_delimiters("");
                ustd::fstream fd_out;
                fd_in.open(fname, ustd::ios::in);
                fd_out.open(fname + "2", ustd::ios::out);

                size_t quote_count = 0;
                ustd::string line;
                while( ustd::getline(fd_in, line) )
                {
                    fd_out.write(line.c_str(), line.size());
                    quote_count += ustd::count(line.begin(), line.end(), '"');
                    //accumulate quote count to check when we have a valid line
                    if( (quote_count % 2) == 0 )
                    {
                        fd_out.write("\n", 1);
                        quote_count = 0;
                    }
                }
                break;
            }
    }

    ustd::string str;
    str += " Alvarez";

    ustd::cout << "Hello world!" << str << ustd::endl;
    return 0;
}

STDUNIX_HEADERS not set on Debian?

Hi,

I tried ustl v2.2 on Debian (8.0). ./configure ran fine, but make got me this error:

ustl-2.2$ make
    Compiling sostream.cc ...
In file included from uutility.h:10:0,
                 from ualgobase.h:7,
                 from cmemlink.h:7,
                 from memlink.h:7,
                 from mistream.h:7,
                 from sostream.cc:6:
utypes.h:12:6: error: #error "This library compiles only on UNIX systems."
     #error "This library compiles only on UNIX systems."
      ^
Makefile:48: recipe for target '.o/sostream.o' failed
make: *** [.o/sostream.o] Error 1

ustl::getline is missing default parameter

Hello !
I finally got one project in dual mode std/ustl it's at https://github.com/mingodad/libnavajo , to make it work several small changes were made and one of then was to ustl itself, the std/ustl::getline function has an optional parameter to specify the delimiter and it is missing in ustl.

sistream.h
/// Reads a line of text from \p is into \p s
inline istringstream& getline (istringstream& is, string& s, char delim = '\n')
{ return is.getline (s, delim); }

If someone want to try that project with ustl there is a codeblocks project there for it.
Cheers !

ustl missing forward_iterator_tag, bidirectional_iterator_tag, ...

Hello !
Doing experiments with ustl I found that the ustl::list (using vector) has a performance toll for insertions/deletions (except at the tail) then I found http://en.literateprograms.org/Unrolled_linked_list_%28C_Plus_Plus%29 and decided to try adapt it to ustl, but ustl do not have some iterator features like forward_iterator_tag, bidirectional_iterator_tag and I can not compile it yet.
But I could run the original benchmark and adapted to run the same benchamark for ustl:

std -> ./perf-test
test_push_back< std::list<int> >: 4.263308
test_push_back< std::vector<int> >: 1.169714
test_push_back< unrolled_list<int,1024> >: 0.355661
test_push_back< unrolled_list<int,128> >: 0.591150
test_push_front< std::list<int> >: 0.043301
test_push_front< std::vector<int> >: 49.488319
test_push_front< unrolled_list<int,1024> >: 0.117148
test_push_front< unrolled_list<int,128> >: 0.020660
test_iteration< std::list<int> >: 1.491637
test_iteration< std::vector<int> >: 0.065647
test_iteration< unrolled_list<int,1024> >: 0.131033
test_iteration< unrolled_list<int,128> >: 0.247265

ustl -> ./perf-test-ustl
test_push_back< ustl::list<int> >: 0.536084
test_push_back< ustl::vector<int> >: 0.500690
test_push_front< ustl::list<int> >: 94.054572
test_push_front< ustl::vector<int> >: 93.953554
test_iteration< ustl::list<int> >: 0.072678
test_iteration< ustl::vector<int> >: 0.071577

The ustl vector/list takes twice as much std::vector and more than 900 times as much std::list (both for push_front).

There is any reason to not have forward_iterator_tag, bidirectional_iterator_tag implemented ?

Attached is the adapted unrolled_list to work with ustl.

Uploading unrolled_list.zip…

question: rdbuf()

how to wrap or emulate such member of ios (currently in ostringstream)?
need to do a:
OutStream.rdbuf()->freeze(0);
any suggestions?

ustl::string operator += do not accept char/unsigned

Hello !
See the sample program bellow (noticed it works with std).
Cheers !

#define USE_STD2
#ifdef USE_STD
#include <iostream>
#include <string>
using namespace std;
#else
#include <ustl.h>
using namespace ustl;
#endif // USE_STD

int main()
{
    string num;
    unsigned char uc = 'a';
    unsigned char c = 'a';

    num += 'a';
    num += c;
    num += uc;
    num += 'b' - 'B';
    num += 'b' + 2;

    return 0;
}
||=== Build: Release in test (compiler: GNU GCC Compiler) ===|
main.cpp||In function ‘int main()’:|
main.cpp|18|error: ambiguous overload for ‘operator+=’ (operand types are ‘ustl::string’ and ‘unsigned char’)|
main.cpp|18|note: candidates are:|
../../../../../../local/include/ustl/ustring.h|137|note: const ustl::string& ustl::string::operator+=(const ustl::string&) <near match>|
../../../../../../local/include/ustl/ustring.h|137|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘const ustl::string&’|
../../../../../../local/include/ustl/ustring.h|138|note: const ustl::string& ustl::string::operator+=(ustl::string::value_type)|
../../../../../../local/include/ustl/ustring.h|139|note: const ustl::string& ustl::string::operator+=(ustl::string::const_pointer) <near match>|
../../../../../../local/include/ustl/ustring.h|139|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘ustl::string::const_pointer {aka const char*}’|
../../../../../../local/include/ustl/ustring.h|140|note: const ustl::string& ustl::string::operator+=(ustl::string::wvalue_type)|
../../../../../../local/include/ustl/ustring.h|141|note: const ustl::string& ustl::string::operator+=(ustl::string::const_wpointer) <near match>|
../../../../../../local/include/ustl/ustring.h|141|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘ustl::string::const_wpointer {aka const wchar_t*}’|
main.cpp|19|error: ambiguous overload for ‘operator+=’ (operand types are ‘ustl::string’ and ‘unsigned char’)|
main.cpp|19|note: candidates are:|
../../../../../../local/include/ustl/ustring.h|137|note: const ustl::string& ustl::string::operator+=(const ustl::string&) <near match>|
../../../../../../local/include/ustl/ustring.h|137|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘const ustl::string&’|
../../../../../../local/include/ustl/ustring.h|138|note: const ustl::string& ustl::string::operator+=(ustl::string::value_type)|
../../../../../../local/include/ustl/ustring.h|139|note: const ustl::string& ustl::string::operator+=(ustl::string::const_pointer) <near match>|
../../../../../../local/include/ustl/ustring.h|139|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘ustl::string::const_pointer {aka const char*}’|
../../../../../../local/include/ustl/ustring.h|140|note: const ustl::string& ustl::string::operator+=(ustl::string::wvalue_type)|
../../../../../../local/include/ustl/ustring.h|141|note: const ustl::string& ustl::string::operator+=(ustl::string::const_wpointer) <near match>|
../../../../../../local/include/ustl/ustring.h|141|note:   no known conversion for argument 1 from ‘unsigned char’ to ‘ustl::string::const_wpointer {aka const wchar_t*}’|
main.cpp|20|error: ambiguous overload for ‘operator+=’ (operand types are ‘ustl::string’ and ‘int’)|
main.cpp|20|note: candidates are:|
../../../../../../local/include/ustl/ustring.h|137|note: const ustl::string& ustl::string::operator+=(const ustl::string&) <near match>|
../../../../../../local/include/ustl/ustring.h|137|note:   no known conversion for argument 1 from ‘int’ to ‘const ustl::string&’|
../../../../../../local/include/ustl/ustring.h|138|note: const ustl::string& ustl::string::operator+=(ustl::string::value_type)|
../../../../../../local/include/ustl/ustring.h|139|note: const ustl::string& ustl::string::operator+=(ustl::string::const_pointer) <near match>|
../../../../../../local/include/ustl/ustring.h|139|note:   no known conversion for argument 1 from ‘int’ to ‘ustl::string::const_pointer {aka const char*}’|
../../../../../../local/include/ustl/ustring.h|140|note: const ustl::string& ustl::string::operator+=(ustl::string::wvalue_type)|
../../../../../../local/include/ustl/ustring.h|141|note: const ustl::string& ustl::string::operator+=(ustl::string::const_wpointer) <near match>|
../../../../../../local/include/ustl/ustring.h|141|note:   no known conversion for argument 1 from ‘int’ to ‘ustl::string::const_wpointer {aka const wchar_t*}’|
main.cpp|21|error: ambiguous overload for ‘operator+=’ (operand types are ‘ustl::string’ and ‘int’)|
main.cpp|21|note: candidates are:|
../../../../../../local/include/ustl/ustring.h|137|note: const ustl::string& ustl::string::operator+=(const ustl::string&) <near match>|
../../../../../../local/include/ustl/ustring.h|137|note:   no known conversion for argument 1 from ‘int’ to ‘const ustl::string&’|
../../../../../../local/include/ustl/ustring.h|138|note: const ustl::string& ustl::string::operator+=(ustl::string::value_type)|
../../../../../../local/include/ustl/ustring.h|139|note: const ustl::string& ustl::string::operator+=(ustl::string::const_pointer) <near match>|
../../../../../../local/include/ustl/ustring.h|139|note:   no known conversion for argument 1 from ‘int’ to ‘ustl::string::const_pointer {aka const char*}’|
../../../../../../local/include/ustl/ustring.h|140|note: const ustl::string& ustl::string::operator+=(ustl::string::wvalue_type)|
../../../../../../local/include/ustl/ustring.h|141|note: const ustl::string& ustl::string::operator+=(ustl::string::const_wpointer) <near match>|
../../../../../../local/include/ustl/ustring.h|141|note:   no known conversion for argument 1 from ‘int’ to ‘ustl::string::const_wpointer {aka const wchar_t*}’|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

shared_ptr any reason to not have it ?

Hello !
I noticed that ustl do not have a shared_ptr implementation, any reason for that ?
Then the next question would be atomic and threads ?

Cheers !

question: setfill()

need to do a
<< ustl::setfill('0') << ustl::setw(6) << ustl::ios::dec <<

where should i implement it?
or how to emulate it?

string::erase overload bug ?

Hello !

I'm testing ustl on https://github.com/titi38/libnavajo and one of the errors I'm getting is this one:

#include <ustl.h>
using namespace ustl;

int main()
{
    string str = "Hello world!";
    str.erase(0,1);
    cout << str << endl;
    return 0;
}
||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
main.cpp||In function ‘int main()’:|
main.cpp|7|error: call of overloaded ‘erase(int, int)’ is ambiguous|
main.cpp|7|note: candidates are:|
../../../../../../local/include/ustl/ustring.h|163|note: ustl::string::value_type* ustl::string::erase(ustl::string::const_iterator, ustl::cmemlink::size_type)|
../../../../../../local/include/ustl/ustring.h|164|note: ustl::string& ustl::string::erase(ustl::cmemlink::size_type, ustl::cmemlink::size_type)|
../../../../../../local/include/ustl/ustring.h|165|note: ustl::string::value_type* ustl::string::erase(ustl::string::const_iterator, ustl::string::const_iterator) <near match>|
../../../../../../local/include/ustl/ustring.h|165|note:   no known conversion for argument 2 from ‘int’ to ‘ustl::string::const_iterator {aka const char*}’|

segmentation fault for any used algorithm

Hi, what i'm doing wrong?

*ustl-2.3$ ./configure && make && make check && sudo make install
Compiling sostream.cc ...
Compiling uexception.cc ...
Compiling ofstream.cc ...
Compiling ualgobase.cc ...
Compiling memlink.cc ...
Compiling bktrace.cc ...
Compiling sistream.cc ...
sistream.cc: In member function ‘ustl::istringstream& ustl::istringstream::get(char
, ustl::cmemlink::size_type, char)’:
sistream.cc:180:8: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
p = c;
^
Compiling fstream.cc ...
Compiling memblock.cc ...
Compiling ustdxept.cc ...
Compiling unew.cc ...
Compiling ubitset.cc ...
Compiling mistream.cc ...
Compiling ustring.cc ...
Compiling cmemlink.cc ...
Linking libustl.so.2.3 ...
Installing /usr/local/lib/libustl.so.2.3 ...
*

code$ cat test.cxx

#include <ustl.h>

int main()
{
    ustl::vector<int> v;
    v.push_back(1);
    v.push_back(2);
    ustl::vector<int> b;
    ustl::copy(v,b.begin());
}

**$ g++ -ggdb test.cxx -o test.x -lgcc_s -lc -lustl
$ ulimit -c unlimited

$ ./test.x
Ошибка сегментирования (core dumped)
$ gdb test.x -core core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test.x...done.
[New LWP 9817]
Core was generated by `./test.x'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f61bd97c0db in copy_n_fast () from /usr/local/lib/libustl.so.2

(gdb) bt
#0 0x00007f61bd97c0db in copy_n_fast () from /usr/local/lib/libustl.so.2
#1 0x0000000000400dbf in unrolled_copy (result=0x0, count=2, first=0x1e15040) at /usr/local/include/ustl/ualgobase.h:186
#2 copy<unsigned int const*, unsigned int*> (result=0x0, last=0x1e15048, first=0x1e15040) at /usr/local/include/ustl/ualgobase.h:228
#3 copy<int const*, int*> (result=0x0, last=0x1e15048, first=0x1e15040) at /usr/local/include/ustl/ualgobase.h:259
#4 copyustl::vector<int, int*> (result=0x0, ctr=...) at /usr/local/include/ustl/uctralgo.h:21
#5 main () at test.cxx:9

(gdb) quit

$ cat /etc/issue
Debian GNU/Linux 8 \n \l

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)**

what i'm doing wrong?

Restructure source tree to allow recursive grep/search

Hello !
The actual way the source tree is organized present some drawbacks after running make once. After running make at least once a symbolic link is created "ustl" pointing to itself, when this symbolic link is present some tools/editors (for example scite) that preform a recursive search go mad in near infinite recursion loop. Also on platforms where there is no symbolic link it'll not work (for example windows, not ported yet).

So I propose to move the ustl sources to real folder "ustl".

Cheers !

make check failure against gcc 4.9.2 on ubuntu 12.04 server 64bit.

Hi,

I'm trying to build ustl on my ubuntu 12.04 server, after running:

  1. ./configure
  2. make
  3. make check

it says:
make: *** [bvt/run] Error 1

below is the full log, can you help me to figure it out?

Linking bvt/bvt09 ...
Linking bvt/bvt10 ...
Linking bvt/bvt11 ...
Linking bvt/bvt12 ...
Linking bvt/bvt13 ...
Linking bvt/bvt14 ...
Linking bvt/bvt15 ...
Linking bvt/bvt16 ...
Linking bvt/bvt17 ...
Linking bvt/bvt19 ...
Linking bvt/bvt20 ...
Linking bvt/bvt21 ...
Linking bvt/bvt22 ...
Linking bvt/bvt24 ...
Linking bvt/bvt25 ...
Linking bvt/bvt26 ...
Linking bvt/bvt27 ...
Linking bvt/bvt29 ...
Linking bvt/bvt18 ...
Linking bvt/bvt23 ...
Linking bvt/bvt28 ...
Running build verification tests:
Running bvt/bvt00
cmemlink{13}: Hello world!1,3d0
< cmemlink{13}: Hello world!

cmemlink{13}: Hello world!< cmemlink{13}: Hello world!
< cmemlink{8}: Hello wo

cmemlink{8}: Hello wo
Running bvt/bvt01
memlink{27}: abcdefghijklmnopqrstuvwzyz1,7d0
< memlink{27}: abcdefghijklmnopqrstuvwzyz
< memlink{27}: abcdefghijklmnopqrstuvwzyz
< memlink{26}: abcdefghijklmnopqrstuvwzyz
< memlink{26}: abcde---------fghijklmnopq
< memlink{26}: abcde----hijklmnopq=======
< memlink{26}: abcdeTESTTESTTESTpq=======
< memlink{26}: abcdeTESTTESTTESTpq=======

memlink{27}: abcdefghijklmnopqrstuvwzyzRunning bvt/bvt02

memlink{26}: abcdefghijklmnopqrstuvwzyz
memlink{26}: abcde---------fghijklmnopq
memlink{26}: abcde----hijklmnopq=======
memlink{26}: abcdeTESTTESTTESTpq=======
memlink{26}: abcdeTESTTESTTESTpq=======
memblock{26}: abcdefghijklmnopqrstuvwxyz
memblock{26}: abcdefghijklmnopqrstuvwxyz
memblock{26}: abcdefghijklmnopqrstuvwxyz
memblock{35}: abcde---------fghijklmnopqrstuvwxyz
memblock{28}: ab-----fghijklmnopqrs=======
memblock{28}: ab---TESTTESTTESTpqrs=======
memblock{50}: ab---TESTTESTTESTpqrs=====-+=-+=-+=-+=-+=-+=-+=-+=
memblock{0}:
memblock{39}: ab---TESTTESTTESTpqrs=====-+=-+=-+=-+=-
Capacity 64, shrunk 39
1,10d0
< memblock{26}: abcdefghijklmnopqrstuvwxyz
< memblock{26}: abcdefghijklmnopqrstuvwxyz
< memblock{26}: abcdefghijklmnopqrstuvwxyz
< memblock{35}: abcde---------fghijklmnopqrstuvwxyz
< memblock{28}: ab-----fghijklmnopqrs=======
< memblock{28}: ab---TESTTESTTESTpqrs=======
< memblock{50}: ab---TESTTESTTESTpqrs=====-+=-+=-+=-+=-+=-+=-+=-+=
< memblock{0}:
< memblock{39}: ab---TESTTESTTESTpqrs=====-+=-+=-+=-+=-
< Capacity 64, shrunk 39
Running bvt/bvt03
Correct number of bytes written
1,13d0
< Correct number of bytes written
< Values:
< char: 0x12
< u_char: 0x12
< bool: 1
< int: 0x12345678
< u_int: 0x12345678
< long: 0x12345678
< u_long: 0x12345678
< float: 0.12345678
< double: 0.1234567891234568
< short: 0x1234
< u_short: 0x1234
Running bvt/bvt04
Values:
char: 0x12
u_char: 0x12
bool: 1
int: 0x12345678
u_int: 0x12345678
long: 0x12345678
u_long: 0x12345678
float: 0.12345678
double: 0.1234567891234568
short: 0x1234
u_short: 0x1234
(1)
Reserved to capacity() == 32 (1 used, SIZE_MAX/elsize max)
(1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18)
front() = 1, back() = 18
(2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17)
(2,3,4,5,6,777,8,9,10,11,666,666,666,12,13,13,14,15,16,17)
(2,3,4,5,6,777,8,9,10,11,666,666,666,12,13)
v[5] == 777
v is now empty
(66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66)
(33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33)
(1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18)
v == v2
A::A
A::A
A::A
A::A
A::operator=
A::operator=
A::operator=
A::~A
Class insertion testing successful
{ 1 2 3 11 12 13 4 22 5 6 7 8 }
A::A(15)
A::~A
A::~A
A::~A
A::~A
1,28d0
< (1)
< Reserved to capacity() == 32 (1 used, SIZE_MAX/elsize max)
< (1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18)
< front() = 1, back() = 18
< (2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17)
< (2,3,4,5,6,777,8,9,10,11,666,666,666,12,13,13,14,15,16,17)
< (2,3,4,5,6,777,8,9,10,11,666,666,666,12,13)
< v[5] == 777
< v is now empty
< (66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66)
< (33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33)
< (1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18)
< v == v2
< A::A
< A::A
< A::A
< A::A
< A::operator=
< A::operator=
< A::operator=
< A::~A
< Class insertion testing successful
< { 1 2 3 11 12 13 4 22 5 6 7 8 }
< A::A(15)
< A::~A
< A::~A
< A::~A
< A::~A
Running bvt/bvt05
{ 1,132d0
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< swap(1,2)
< { 2 1 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< copy(0,8,9)
< { 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 }
< copy with back_inserter
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< copy with inserter
< { 1 2 3 1 2 3 4 5 4 5 }
< copy_n(0,8,9)
< { 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 }
< copy_if(is_even)
< { 2 4 6 8 10 10 12 14 16 18 }
< for_each(printint)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< for_each(reverse_iterator, printint)
< { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
< find(10)
< 10 found at offset 9
< count(13)
< 2 values of 13, 1 values of 18
< transform(sqr)
< { 1 4 9 16 25 36 49 64 81 100 100 121 144 169 169 196 225 256 289 324 }
< replace(13,666)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 666 666 14 15 16 17 18 }
< fill(13)
< { 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 }
< fill_n(5, 13)
< { 13 13 13 13 13 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< fill 64083 uint8_t(0x41) works
< fill 64083 uint16_t(0x4142) works
< fill 64083 uint32_t(0x41424344) works
< fill 64083 float(0.4242) works
< fill 64083 uint64_t(0x4142434445464748) works
< copy 64083 uint8_t(0x41) works
< copy 64083 uint16_t(0x4142) works
< copy 64083 uint32_t(0x41424344) works
< copy 64083 float(0.4242) works
< copy 64083 uint64_t(0x4142434445464748) works
< generate(genint)
< { 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 }
< rotate(4)
< { 15 16 17 18 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 }
< merge with (3,5,10,11,11,14)
< { 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 }
< inplace_merge with (3,5,10,11,11,14)
< { 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 }
< remove(13)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 14 15 16 17 18 }
< remove (elements 3, 4, 6, 15, and 45)
1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< { 1 2 3 6 8 9 10 10 11 12 13 13 15 16 17 18 }
< unique
< { 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 }
< reverse
< { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
< lower_bound(10)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< 10 begins at position 9
< upper_bound(10)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< 10 ends at position 11
< equal_range(10)
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< Range of 10 is { 9, 11 }
< Range of 0 is { 0, 0 }
< Range of 100 is { 20, 20 }
< sort
< { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< stable_sort
< { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< is_sorted
< unsorted=false, sorted=true
< find_first_of
swap(1,2)
{ 2 1 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< found 14 at position 15
< lexicographical_compare
< LC1 < LC2 == true
< LC2 < LC2 == false
< LC3 < LC4 == true
< LC4 < LC1 == true
< LC1 < LC4 == false
< max_element
< max element is 18
< min_element
< min element is 1
< partial_sort
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< partial_sort_copy
< { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
< partition
< { 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 }
< stable_partition
< { 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 }
< next_permutation
< { 1 2 3 }
< { 1 3 2 }
< { 2 1 3 }
< { 2 3 1 }
< { 3 1 2 }
< { 3 2 1 }
< prev_permutation
< { 3 2 1 }
< { 3 1 2 }
< { 2 3 1 }
< { 2 1 3 }
< { 1 3 2 }
< { 1 2 3 }
< reverse_copy
< { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
< rotate_copy
< { 7 8 9 10 10 11 12 13 13 14 15 16 17 18 1 2 3 4 5 6 }
< search
< {5,6,7,8,9} at 4
< {10,10,11,14} at 20
< find_end
< {5,6,7,8,9} at 4
copy(0,8,9)
{ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 }
copy with back_inserter
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
copy with inserter
{ 1 2 3 1 2 3 4 5 4 5 }
< {10,10,11,14} at 20
< search_n
< {14} at 15
< {13,13} at 13
< {10,10,10} at 20
< includes
< includes=true, not includes=false
< set_difference
< { 1 2 3 5 }
< set_symmetric_difference
< { 1 2 3 4 5 7 8 }
< set_intersection
< { 4 6 }
< set_union
< { 1 2 3 4 4 5 6 7 8 }
copy_n(0,8,9)
{ 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 }
copy_if(is_even)
{ 2 4 6 8 10 10 12 14 16 18 }
Running bvt/bvt06
for_each(printint)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
for_each(reverse_iterator, printint)
{ 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
find(10)
10 found at offset 9
count(13)
2 values of 13, 1 values of 18

transform(sqr)

vector of 10 elements:

0
1 2
3 4 5
6 7 8 9
10 11 12 13 14
15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 32 33 34 35

36 37 38 39 40 41 42 43 44

size() = 10, max_size() = SIZE_MAX/elsize, empty() = false
back()->size() = 5
back()->size() = 40

36 37 38 39 40 41 42 43 44

vector of 7 elements backwards:

28 29 30 31 32 33 34 35
21 22 23 24 25 26 27
6 7 8 9
3 4 5
1 2
0


1,29d0
< ---
< vector of 10 elements:
< ---
<
< 0
< 1 2
< 3 4 5
< 6 7 8 9
< 10 11 12 13 14
< 15 16 17 18 19 20
< 21 22 23 24 25 26 27
< 28 29 30 31 32 33 34 35
< 36 37 38 39 40 41 42 43 44
< ---
< size() = 10, max_size() = SIZE_MAX/elsize, empty() = false
< back()->size() = 5
< back()->size() = 40
< 36 37 38 39 40 41 42 43 44
< ---
< vector of 7 elements backwards:
< ---
< 28 29 30 31 32 33 34 35
< 21 22 23 24 25 26 27
< 6 7 8 9
< 3 4 5
< 1 2
< 0
<
< ---
{ 1 4 9 16 25 36 49 64 81 100 100 121 144 169 169 196 225 256 289 324 }
replace(13,666)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 666 666 14 15 16 17 18 }
Running bvt/bvt07
fill(13)
{ 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 }
fill_n(5, 13)
{ 13 13 13 13 13 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
123456789012345678901234567890
abcdefghijklmnopqrstuvwxyz
123456789012345678901234567890
12345678901234567890
s3.size() = 20, max_size() = (SIZE_MAX/elsize)-1, capacity() = 63
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$
HelloWorld
Concatenated HelloWorld string.
s1 < s2
s1 == s1
s1 == s4
56789 == 56789
&s1[7] = 89012345678901234567890
initial: 123456789012345678901234567890
erase(5,find(9)-5) 123459012345678901234567890
erase(5,5) 1234545678901234567890
push_back('x') 1234545678901234567890x
pop_back()
insert(10,#) 1234545678#901234567890
replace(0,5,@) @45678#901234567890
8 found at 7
9 found at 8
7 rfound at 26
7 rfound again at 16
67 rfound at 25
X was not rfound
[456] found at 3
[456] last found at 25
s2 is empty [], capacity 5 bytes
<31 bytes of 31> Format '<const] 42, [rfile>, 0xDEADBEEF'
Custom vararg MyFormat: '<const] 42, [rfile>, 0xDEADBEEF'
hash_value(s2) = 95A714F3, string::hash(s2) = 95A714F3
fill 64083 uint8_t(0x41) works
fill 64083 uint16_t(0x4142) works
fill 64083 uint32_t(0x41424344) works
fill 64083 float(0.4242) works
fill 64083 uint64_t(0x4142434445464748) 1,32d0
< 123456789012345678901234567890
< abcdefghijklmnopqrstuvwxyz
< 123456789012345678901234567890
< 12345678901234567890
< s3.size() = 20, max_size() = (SIZE_MAX/elsize)-1, capacity() = 63
< abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$
< HelloWorld
< Concatenated HelloWorld string.
< s1 < s2
< s1 == s1
< s1 == s4
< 56789 == 56789
< &s1[7] = 89012345678901234567890
< initial: 123456789012345678901234567890
< erase(5,find(9)-5) 123459012345678901234567890
< erase(5,5) 1234545678901234567890
< push_back('x') 1234545678901234567890x
< pop_back()
< insert(10,#) 1234545678#901234567890
< replace(0,5,@) @45678#901234567890
< 8 found at 7
< 9 found at 8
< 7 rfound at 26
< 7 rfound again at 16
< 67 rfound at 25
< X was not rfound
< [456] found at 3
< [456] last found at 25
< s2 is empty [], capacity 5 bytes
< <31 bytes of 31> Format '<const] 42, [rfile>, 0xDEADBEEF'
< Custom vararg MyFormat: '<const] 42, [rfile>, 0xDEADBEEF'
< hash_value(s2) = 95A714F3, string::hash(s2) = 95A714F3
Running bvt/bvt08
works
copy 64083 uint8_t(0x41) works
copy 64083 uint16_t(0x4142) works
copy 64083 uint32_t(0x41424344) works
copy 64083 float(0.4242) works
copy 64083 uint64_t(0x4142434445464748) 1,30d0
< Hello world!
< Hello again!
< element3
< element4
< element5_long_element5
< element3 found at position 2
< After erase (end,end):
< Hello world!
< Hello again!
< element3
Hello world!< element4
< element5_long_element5
< After erase (2,2):

Hello again!
element3
element4
element5_long_element5< Hello world!

element3 found at position < Hello again!
< element5_long_element5
< After pop_back():
< Hello world!
2
After erase (end,end):
Hello world!
Hello again!
element3
element4
element5_long_element5
After erase (2,2):
Hello world!
Hello again!
element5_long_element5< Hello again!

After pop_back():
Hello world!
Hello again!
element3
element4
After insert(1,1,3):
Hello world!
Hello again!
element3
element4
Hello again!
element3
element4
element5_long_element5
< element3
< element4
< After insert(1,1,3):
< Hello world!
< Hello again!
< element3
< element4
< Hello again!
< element3
< element4
< element5_long_element5
Running bvt/bvt09
works
generate(genint)
{ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 }
rotate(4)
{ 15 16 17 18 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 }
merge with (3,5,10,11,11,14)
{ 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 }
84 bytes written
Values:
char: 'c'
u_char: 'c'
bool: 1
int: -12345678
u_int: 12345678
long: -12345678
u_long: 12345678
float: 123.46
double: 123456789123456.78
short: 1234
u_short: 1234

Dump:
c
c
true
-12345678
12345678
-12345678
12345678
123.46
123456789123456.78
1234
1234

1,28d0
< 84 bytes written
< Values:
< char: 'c'
< u_char: 'c'
< bool: 1
< int: -12345678
< u_int: 12345678
< long: -12345678
< u_long: 12345678
< float: 123.46
< double: 123456789123456.78
< short: 1234
< u_short: 1234
inplace_merge with (3,5,10,11,11,14)
{ 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 }
remove(13)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 14 15 16 17 18 }
remove (elements 3, 4, 6, 15, and 45)
{ 1 2 3 6 8 9 10 10 11 12 13 13 15 16 17 18 }
<
< Dump:
< c
< c
< true
< -12345678
< 12345678
< -12345678
< 12345678
< 123.46
< 123456789123456.78
< 1234
< 1234
<
<
Running bvt/bvt10
unique
{ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 }
reverse
{ 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
lower_bound(10)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
10 begins at position 9
upper_bound(10)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
10 ends at position 11
equal_range(10)
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
Range of 10 is { 9, 11 }
Range of 0 is { 0, 0 }
Range of 100 is { 20, 20 }
sort
{ 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
stable_sort
{ 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
is_sorted
unsorted=false, sorted=true
find_first_of
found 14 at position 15
lexicographical_compare
LC1 < LC2 == true
LC2 < LC2 == false
LC3 < LC4 == true
LC4 < LC1 == true
LC1 < LC4 == false
max_element
max element is 18
min_element
min element is 1
partial_sort
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
partial_sort_copy
{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 }
partition
{ 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 }
stable_partition
{ 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 }
next_permutation
{ 1 2 3 }
{ 1 3 2 }
{ 2 1 3 }
{ 2 3 1 }
{ 3 1 2 }
{ 3 2 1 }
prev_permutation
{ 3 2 1 }
{ 3 1 2 }
{ 2 3 1 }
{ 2 1 3 }
{ 1 3 2 }
{ 1 2 3 }
reverse_copy
{ 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 }
rotate_copy
{ 7 8 9 10 10 11 12 13 13 14 15 16 17 18 1 2 3 4 5 6 }
search
{5,6,7,8,9} at 4
{10,10,11,14} at 20
find_end
{5,6,7,8,9} at 4
{10,10,11,14} at 20
search_n
{14} at 15
{13,13} at 13
{10,10,10} at 20
includes
includes=true, not includes=false
set_difference
{ 1 2 3 5 }
set_symmetric_difference
{ 1 2 3 4 5 7 8 }
set_intersection
{ 4 6 }
set_union
{ 1 2 3 4 4 5 6 7 8 }
start: { 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 }
plus: { 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 }
minus: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
divides: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
multiplies: { 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 }
modulus: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
logical_and: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
logical_or: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
equal_to: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
not_equal_to: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
greater: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
less: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
greater_equal: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
less_equal: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
compare: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
negate: { -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 }
logical_not: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
unary_neg(negate): { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
binder1st(plus,5): { 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 }
binder2nd(minus,1): { 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 }
compose1(-,+5): { -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 }
1,27d0
compose1(-,-4): { 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 }
compose2(/,+6,-4): { -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 }
mem_var(plus,6): { 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 }
14 found at position 8
18 found at position 12
add next: { 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 25 }
< start: { 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 }
< plus: { 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 }
< minus: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< divides: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< multiplies: { 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 }
< modulus: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< logical_and: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< logical_or: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< equal_to: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< not_equal_to: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< greater: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< less: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< greater_equal: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< less_equal: { 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 }
< compare: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< negate: { -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 }
< logical_not: { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< unary_neg(negate): { 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }
< binder1st(plus,5): { 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 }
< binder2nd(minus,1): { 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 }
< compose1(-,+5): { -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 -7 -6 }
< compose1(-,-4): { 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 }
< compose2(/,+6,-4): { -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 -4 -2 }
< mem_var(plus,6): { 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 }
< 14 found at position 8
< 18 found at position 12
< add next: { 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 25 }
Running bvt/bvt11
set: 1,7d0
< set: { 1 2 3 4 6 8 9 }
< erase(3): { 1 2 4 6 8 9 }
< multiset: { 1 1 1 1 2 3 3 4 4 6 8 9 }
< count(1) = 4
< find(4) = 7
< find(5) = false
< erase(3): { 1 1 1 1 2 4 4 6 8 9 }
{ 1 2 3 4 6 8 9 }
erase(3): { 1 2 4 6 8 9 }Running bvt/bvt12

multiset: { 1 1 1 1 2 3 3 4 4 6 8 9 }
count(1) = 4
find(4) = 7
find(5) = false
erase(3): { 1 1 1 1 2 4 4 6 8 9 }
Write const void_, pos is right
Write void_, pos is right
Write string, pos is right
Write const string_, pos is right
Write string_, pos is right
Write vector<uint16_t>(7), pos is right
Read const void_, pos is right, value is right
Read void_, pos is right, value is right
Read string, pos is right, value is TestString
Read const string_, pos is right, value is right
Read string_, pos is right, value is right
Read vector<uint16_t>(7), pos is right, value is right
1,12d0
< Write const void_, pos is right
< Write void_, pos is right
< Write string, pos is right
< Write const string_, pos is right
< Write string_, pos is right
< Write vector<uint16_t>(7), pos is right
< Read const void_, pos is right, value is right
< Read void_, pos is right, value is right
< Read string, pos is right, value is TestString
< Read const string_, pos is right, value is right
< Read string_, pos is right, value is right
< Read vector<uint16_t>(7), pos is right, value is right
Running bvt/bvt13
Testing string reads
A string printed to stdout
1,7d0
< Testing string reads
< A string printed to stdout
< 4 numbers: 12345678, 4321, 0x78675645, 1.234567890123456
< A ustl::string object printed 3 times
< A ustl::string object printed 3 times
< A ustl::string object printed 3 times
< All done.
4 numbers: 12345678, 4321, 0x78675645, 1.234567890123456
A ustl::string object printed 3 times
Running bvt/bvt14
A ustl::string object printed 3 times
A ustl::string object printed 3 times
All done.
There are 1,23d0
< There are 31 days in january.
< There are 30 days in september.
< There are 31 days in december.
< may found at index 8
< Alphabetical listing:
< april has 30 days.
< august has 31 days.
< december has 31 days.
< february has 28 days.
< january has 31 days.
< july has 31 days.
< june has 30 days.
< march has 31 days.
< may has 31 days.
< november has 30 days.
< october has 31 days.
< september has 30 days.
< After erasing may:
< april august december february january july june march november october september
< After erasing months 2, 3, 4, and the last one:
31 days in january.< april january july june march may november october
< After inserting frobuary,42:
< april august december february frobuary january july june march may november october september

There are 30 days in september.
There are 31 days in december.
may found at index 8
Alphabetical listing:
april has 30 days.
august has 31 days.
december has 31 days.
february has 28 days.
january has 31 days.
july has 31 days.
june has 30 days.
march has 31 days.
may has 31 days.
november has 30 days.
october has 31 days.
september has 30 days.
After erasing may:
april august december february january july june march november october september
After erasing months 2, 3, 4, and the last one:
april january july june march may november october
After inserting frobuary,42:
april august december february frobuary january july june march may november october september
Running bvt/bvt15
As-inserted listing:
Dumb - $15000
Dave - $27000
Jim - $27000
Gail - $47000
Barbara - $47000
Mary - $47000
BigBoss - $99000
Alphabetical listing:
1,30d0
Dumb - $15000
Dave - $27000
Jim - $27000
Barbara - $< As-inserted listing:
< Dumb - $15000
< Dave - $27000
< Jim - $27000
< Gail - $47000
< Barbara - $47000
< Mary - $47000
< BigBoss - $99000
< Alphabetical listing:
< Dumb - $15000
< Dave - $27000
< Jim - $27000
< Barbara - $47000
< Gail - $47000
< Mary - $47000
< BigBoss - $99000
< Employees making $47000: Barbara Gail Mary
< Dave makes $27000
< There are 2 low-paid employees
< Firing all low-paid employees:
< Dumb - $15000
< Barbara - $47000
< Gail - $47000
< Mary - $47000
< BigBoss - $99000
< Firing dumb employees:
< Barbara - $47000
< Gail - $47000
< Mary - $47000
< BigBoss - $99000
47000
Gail - $47000
Mary - $47000
BigBoss - $99000
Employees making $Running bvt/bvt16
47000: Barbara Gail Mary
Dave makes $27000
There are 2 low-paid employees
Firing all low-paid employees:
Dumb - $15000
Barbara - $47000
Gail - $47000
Mary - $47000
BigBoss - $99000
Firing dumb employees:
Barbara - $47000
Gail - $47000
MaryGenerating Unicode characters - $47000
BigBoss - $99000
1,11d0
< Generating Unicode characters 0 - 65534
< Encoding to utf8.
< Decoding back.
< Comparing.
< src = 65535 chars, encoded = 194429 chars, decoded = 65535
< 0 differences between src and decoded.
< Testing wide character string::insert
< Values[17]: 1234 49 50 3456 4567 3456 4567 2345 51 52 53 54 55 56 57 48 5678
< Character offsets: 0 2 3 4 7 10 13 16 19 20 21 22 23 24 25 26 27
< Erasing character 16: 1234 49 50 3456 4567 3456 4567 2345 51 52 53 54 55 56 57 48
< Erasing 2 characters after '2': 1234 49 50 3456 4567 2345 51 52 53 54 55 56 57 48
Running bvt/bvt17
1,33d0
< bitset<30> bs1: capacity() = 32, sizeof() = 4
< 000000000000000000000000000000
< 111111111111111111111110111111
< 000000000000000000000001000000
< 111111111111111111111110111111
< 011010011001011001011000100100
< count = 13
< 000000000000000000000000000000
< any = false, none = true, count = 0
< 111111111111111111111111111111
< any = true, none = false, count = 32
< 000000000000000000000110010000
< test(7) == true, [9] = false, [8] = true
< any = true, none = false, count = 3
< ~bs1 == 111111111111111111111001101111
< to_value == 0x190
< bitset<70> bs2: capacity() = 96, sizeof() = 12
< 0000000000000000000000000000000000000000000000000000000000000000101101
< bs2.set(34,40,13)
< 0000000000000000000000000000000011010000000000000000000000000000101101
< bs2.at(34,40) = 13
< bitset<256> bs3: capacity() = 256, sizeof() = 32
< bs3.to_value() == 0x3030
< bs4 == bs1
< bs4 = 0x50505050: 010000010100000101000001010000
< bs1 = 0x30303030: 110000001100000011000000110000
< bs4 &= bs1; bs4 = 010000000100000001000000010000
< bs4 & bs1; bs4 = 010000000100000001000000010000
< bs4 |= bs1; bs4 = 110000011100000111000001110000
< bs4 | bs1; bs4 = 110000011100000111000001110000
< bs4 ^= bs1; bs4 = 100000011000000110000001100000
< bs4 ^ bs1; bs4 = 100000011000000110000001100000
< stream[4]; bs4 = 100000011000000110000001100000
Running bvt/bvt18
bitset<30> bs1: capacity() = 32, sizeof() = 4
000000000000000000000000000000
111111111111111111111110111111
000000000000000000000001000000
111111111111111111111110111111
011010011001011001011000100100
count = 13
000000000000000000000000000000
any = false, none = true, count = 0
111111111111111111111111111111
any = true, none = false, count = 32
000000000000000000000110010000
test(7) == true, [9] = false, [8] = true
any = true, none = false, count = 3
~bs1 == ================================================111111111111111111111001101111
to_value == 0x190
bitset<70> bs2: capacity() = 96, sizeof() = 12
0000000000000000000000000000000000000000000000000000000000000000101101

Testing tuple<4,float>

bs2.set(34,40,13)
0000000000000000000000000000000011010000000000000000000000000000101101
bs2.at(34,40) = 13
bitset<256> bs3: capacity() = 256, sizeof() = 32
bs3.to_value() == 0x3030
bs4 == bs1
bs4 = 0x50505050: 010000010100000101000001010000
bs1 = 0x30303030: 110000001100000011000000110000
bs4 &= bs1; bs4 = 010000000100000001000000010000
bs4 & bs1; bs4 = 010000000100000001000000010000
bs4 |= bs1; bs4 = 110000011100000111000001110000
bs4 | bs1; bs4 = 110000011100000111000001110000
bs4 ^= bs1; bs4 = 100000011000000110000001100000
bs4 ^ bs1; bs4 = 1000000110000001100000011000001,184d0

stream[4]; bs4 = 100000011000000110000001100000
< ================================================
< Testing tuple<4,float>
< ================================================

pt1: size = 4, value = (1.00,2.00,3.00,4.00)
pt2: (5.00,6.00,7.00,8.00)
pt2: < pt1: size = 4, value = (1.00,2.00,3.00,4.00)
< pt2: (5.00,6.00,7.00,8.00)
< pt2: (10.00,11.00,12.00,13.00)
(10.00,11.00,12.00,13.00)
pt1 *= 3: (3.00,6.00,9.00,12.00)
pt1 /= 3: (1.00,2.00,3.00,4.00)
pt1 += 3: (4.00,5.00,6.00,7.00)
pt1 -= 3: (1.00,2.00,3.00,4.00)
pt1 *= pt2: (10.00,22.00,36.00,52.00)
pt1 /= pt2: < pt1 *= 3: (3.00,6.00,9.00,12.00)
< pt1 /= 3: (1.00,2.00,3.00,4.00)
< pt1 += 3: (4.00,5.00,6.00,7.00)
< pt1 -= 3: (1.00,2.00,3.00,4.00)
< pt1 *= pt2: (10.00,22.00,36.00,52.00)
< pt1 /= pt2: (1.00,2.00,3.00,4.00)
< pt1 += pt2: (11.00,13.00,15.00,17.00)
< pt1 -= pt2: (1.00,2.00,3.00,4.00)
< pt1 = pt1 * pt2: (10.00,22.00,36.00,52.00)
< pt1 = pt1 / pt2: (1.00,2.00,3.00,4.00)
< pt1 = pt1 + pt2: (11.00,13.00,15.00,17.00)
< pt1 = pt1 - pt2: (1.00,2.00,3.00,4.00)
< ================================================
< Testing tuple<2,float>
< ================================================
(1.00,2.00,3.00,4.00)
pt1 += pt2: (11.00,13.00,15.00,17.00)
pt1 -= pt2: (1.00,2.00,3.00,4.00)
pt1 = pt1 * pt2: < pt1: size = 2, value = (1.00,2.00)
(10.00,22.00,36.00,52.00)
pt1 = pt1 / pt2: (1.00,2.00,3.00,4.00)
pt1 = pt1 + pt2: (11.00,13.00,15.00,17.00)
pt1 = pt1 - pt2: < pt2: (5.00,6.00)
< pt2: (10.00,11.00)
< pt1 *= 3: (3.00,6.00)
< pt1 /= 3: (1.00,2.00)
< pt1 += 3: (4.00,5.00)
< pt1 -= 3: (1.00,2.00)

(1.00,2.00,3.00,4.00)

Testing tuple<2,float>
================================================< pt1 *= pt2: (10.00,22.00)
< pt1 /= pt2: (1.00,2.00)
< pt1 += pt2: (11.00,13.00)
< pt1 -= pt2: (1.00,2.00)
< pt1 = pt1 * pt2: (10.00,22.00)
< pt1 = pt1 / pt2: (1.00,2.00)
< pt1 = pt1 + pt2: (11.00,13.00)
< pt1 = pt1 - pt2: (1.00,2.00)
< ================================================
< Testing tuple<4,int32_t>
< ================================================

pt1: size = 2, value = (1.00,2.00)
pt2: (5.00,6.00)
pt2: (10.00,11.00)
pt1 *= 3: (3.00,6.00)
pt1 /= 3: (1.00,2.00)
pt1 += 3: (4.00,5.00)
pt1 -= 3: (1.00,2.00)
pt1 *= pt2: (10.00,22.00)
pt1 /= pt2: (1.00,2.00)
pt1 += pt2: (11.00,13.00)
pt1 -= pt2: (1.00,2.00)
pt1 = pt1 * pt2: (10.00,22.00)
pt1 = pt1 / pt2: < pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
(1.00,2.00)
pt1 = pt1 + pt2: (11.00,13.00)

pt1 = pt1 - pt2: (1.00,2.00)

Testing tuple<4,int32_t>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)
pt1 = pt1 - pt2: (1,2,3,4)
================================================< pt1 += 3: (4,5,6,7)

Testing tuple<4,uint32_t>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: < pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
(1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing tuple<2,int32_t>

pt1: size = 2, value = (1,2)
pt2: (5,6)
pt2: (10,11)
pt1 *= 3: (3,6)
pt1 /= 3: (1,2)
pt1 += 3: < pt1 /= pt2: (1,2,3,4)
(4,5)
pt1 -= 3: (1,2)
pt1 *= pt2: (10,22)
pt1 /= pt2: (1,2)
pt1 += pt2: (11,13)
pt1 -= pt2: (1,2)
pt1 = pt1 * pt2: (10,22)
pt1 = pt1 / pt2: (1,2)
pt1 = pt1 + pt2: (11,13)
pt1 = pt1 - pt2: (1,2)
================================================< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing tuple<4,uint32_t>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)

Testing tuple<2,uint32_t>

pt1: size = 2, value = (1,2)
pt2: (5,6)
pt2: (10,11)
pt1 *= 3: (3,6)
pt1 /= 3: (1,2)
pt1 += 3: (4,5)
pt1 -= 3: (1,2)
pt1 *= pt2: (10,22)
pt1 /= pt2: (1,2)
pt1 += pt2: (11,13)
pt1 -= pt2: (1,2)
pt1 = pt1 * pt2: (10,22)
pt1 = pt1 / pt2: (1,2)
pt1 = pt1 + pt2: (11,13)

pt1 = pt1 - pt2: (1,2)

Testing tuple<4,int16_t>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing tuple<4,uint16_t>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 =< pt1 += 3: (4,5,6,7)
pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing tuple<8,int8_t>

pt1: size = 8, value = (1,2,3,4,5,6,7,8)
pt2: (5,6,7,8,0,0,0,0)
pt2: (10,11,12,13,14,15,16,17)
pt1 *= 3: (3,6,9,12,15,18,21,24)
pt1 /= 3: (1,2,3,4,5,6,7,8)
pt1 += 3: (4,5,6,7,8,9,10,11)
pt1 -= 3: (1,2,3,4,5,6,7,8)
pt1 *= pt2: (10,22,'$','4','F','Z','p',-120)
pt1 /= pt2: (1,2,3,4,5,6,7,-7)
pt1 += pt2: (11,13,15,17,19,21,23,10)
pt1 -= pt2: (1,2,3,4,5,6,7,-7)
pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',-119)
pt1 = pt1 / pt2: (1,2,3,4,5,6,7,-7)
pt1 = pt1 + pt2: (11,13,15,17,19,21,23,10)

pt1 = pt1 - pt2: (1,2,3,4,5,6,7,-7)

Testing tuple<8,uint8_t>

pt1: size = 8, value = (1,2,3,4,5,6,7,8)
pt2: (5,6,7,8,0,0,0,0)
pt2: (10,11,12,13,14,15,16,17)
pt1 *= 3: (3,6,9,< pt1 -= 3: (1,2,3,4)
12,15,18,21,24)
pt1 /= 3: (1,2,3,4,5,6,7,8)
pt1 += 3: (4,5,6,7,8,9,10,11)
pt1 -= 3: (1,2,3,4,5,6,7,8)
pt1 *= pt2: (10,22,'$','4','F','Z','p',136)
pt1 /= pt2: (1,2,3,4,5,6,7,8)
pt1 += pt2: (11,13,15,17,19,21,23,25)
pt1 -= pt2: (1,2,3,4,5,6,7,8)
pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',136)
pt1 = pt1 / pt2: (1,2,3,4,5,6,7,8)
pt1 = pt1 + pt2: (11,13,15,17,19,21,23,25)

pt1 = pt1 - pt2: (1,2,3,4,5,6,7,8)

Testing tuple<3,string>

======================< pt1 *= pt2: (10,22,36,52)

str: (str0,str1,str2)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing tuple<2,int32_t>
< ================================================
< pt1: size = 2, value = (1,2)
< pt2: (5,6)
< pt2: (10,11)
< pt1 *= 3: (3,6)
< pt1 /= 3: (1,2)
< pt1 += 3: (4,5)
< pt1 -= 3: (1,2)
< pt1 *= pt2: (10,22)
< pt1 /= pt2: (1,2)
< pt1 += pt2: (11,13)
< pt1 -= pt2: (1,2)
< pt1 = pt1 * pt2: (10,22)
< pt1 = pt1 / pt2: (1,2)
< pt1 = pt1 + pt2: (11,13)
< pt1 = pt1 - pt2: (1,2)
< ================================================
< Testing tuple<2,uint32_t>
< ================================================
< pt1: size = 2, value = (1,2)
< pt2: (5,6)
< pt2: (10,11)
< pt1 *= 3: (3,6)
< pt1 /= 3: (1,2)
< pt1 += 3: (4,5)
< pt1 -= 3: (1,2)
< pt1 *= pt2: (10,22)
< pt1 /= pt2: (1,2)
< pt1 += pt2: (11,13)
< pt1 -= pt2: (1,2)
< pt1 = pt1 * pt2: (10,22)
< pt1 = pt1 / pt2: (1,2)
< pt1 = pt1 + pt2: (11,13)
< pt1 = pt1 - pt2: (1,2)
< ================================================
< Testing tuple<4,int16_t>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
< pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing tuple<4,uint16_t>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
< pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing tuple<8,int8_t>
< ================================================
< pt1: size = 8, value = (1,2,3,4,5,6,7,8)
< pt2: (5,6,7,8,0,0,0,0)
< pt2: (10,11,12,13,14,15,16,17)
< pt1 *= 3: (3,6,9,12,15,18,21,24)
< pt1 /= 3: (1,2,3,4,5,6,7,8)
< pt1 += 3: (4,5,6,7,8,9,10,11)
< pt1 -= 3: (1,2,3,4,5,6,7,8)
< pt1 *= pt2: (10,22,'$','4','F','Z','p',-120)
< pt1 /= pt2: (1,2,3,4,5,6,7,-7)
< pt1 += pt2: (11,13,15,17,19,21,23,10)
< pt1 -= pt2: (1,2,3,4,5,6,7,-7)
< pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',-119)
< pt1 = pt1 / pt2: (1,2,3,4,5,6,7,-7)
< pt1 = pt1 + pt2: (11,13,15,17,19,21,23,10)
< pt1 = pt1 - pt2: (1,2,3,4,5,6,7,-7)
< ================================================
< Testing tuple<8,uint8_t>
< ================================================
< pt1: size = 8, value = (1,2,3,4,5,6,7,8)
< pt2: (5,6,7,8,0,0,0,0)
< pt2: (10,11,12,13,14,15,16,17)
< pt1 *= 3: (3,6,9,12,15,18,21,24)
< pt1 /= 3: (1,2,3,4,5,6,7,8)
< pt1 += 3: (4,5,6,7,8,9,10,11)
< pt1 -= 3: (1,2,3,4,5,6,7,8)
< pt1 *= pt2: (10,22,'$','4','F','Z','p',136)
< pt1 /= pt2: (1,2,3,4,5,6,7,8)
< pt1 += pt2: (11,13,15,17,19,21,23,25)
< pt1 -= pt2: (1,2,3,4,5,6,7,8)
< pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',136)
< pt1 = pt1 / pt2: (1,2,3,4,5,6,7,8)
< pt1 = pt1 + pt2: (11,13,15,17,19,21,23,25)
< pt1 = pt1 - pt2: (1,2,3,4,5,6,7,8)
< ================================================
< Testing tuple<3,string>
< ================================================
< str: (str0,str1,str2)
Running bvt/bvt19
Testing operator+
apple = apple
peach = 1,3d0
< Testing operator+
< apple = apple
< peach = peach
peach
Running bvt/bvt20
Testing stack: popping: 5 4 3 2 1
Testing queue: popping: 1 2 3 4 5
1,2d0
< Testing stack: popping: 5 4 3 2 1
< Testing queue: popping: 1 2 3 4 5
Running bvt/bvt21
0 - 65534
Encoding to utf8.
Decoding back.
DivRU(13,5) = 1,68d0
< DivRU(13,5) = 3
< DivRU(15,5) = 3
< DivRU(-12,5) = -3
<
< Align(5) = 8
< Align(5,2) = 6
< Align(17,7) = 21
< Align(14,7) = 14
<
< NextPow2(0) = 1
< NextPow2(1) = 2
< NextPow2(4) = 4
< NextPow2(3827) = 4096
< NextPow2(0xFFFFFFF0) = 1
<
< advance(42,0) = 42
< advance(42,3) = 45
< cvp = 1234
< vp = 4321
< advance(cvp,5) = 1239
< advance(vp,4) = 4325
< distance(cvp,vp) = 30ED
< abs_distance(vp,cvp) = 30ED
<
< size_of_elements(3, c_Numbers) = 12
< VectorSize(c_Numbers[5]) = 5
< VectorSize(c_Numbers[0]) = 0
<
< BitsInType(uint32_t) = 32
< BitsInType(int16_t) = 16
< BitsInType(char) = 8
<
< BitMask(uint32_t,12) = FFF
< BitMask(uint16_t,1) = 1
< BitMask(uint8_t,8) = FF
< BitMask(uint16_t,0) = 0
<
< pack_type(uint8_t, uint16_t) = 4242
< pack_type(uint8_t, uint32_t) = 42424242
< pack_type(uint16_t, uint32_t) = 42434243
< pack_type(uint8_t, uint64_t) = 4242424242424242
< pack_type(uint32_t, uint64_t) = 4243444542434445
<
< bswap(1234) = 3412
< le_to_native(1234) = ok
< native_to_le(1234) = ok
< be_to_native(1234) = ok
< native_to_be(1234) = ok
< bswap(12345678) = 78563412
< le_to_native(12345678) = ok
< native_to_le(12345678) = ok
< be_to_native(12345678) = ok
< native_to_be(12345678) = ok
< bswap(123456789ABCDEF0) = F0DEBC9A78563412
< le_to_native(123456789ABCDEF0) = ok
< native_to_le(123456789ABCDEF0) = ok
< be_to_native(123456789ABCDEF0) = ok
< native_to_be(123456789ABCDEF0) = ok
<
< absv(12) = 12
< absv(-12) = 12
< sign(12) = 1
< sign(-12) = -1
< sign(0) = 0
< min(3,4) = 3
< min(6U,1U) = 1
< max(-3,-6) = -3
< max(-3L,6L) = 6
3
DivRU(15,5) = Running bvt/bvt22
3
DivRU(-12,5) = -3

Align(5) = 8
Align(5,2) = Comparing.
src = 65535 chars, encoded = 194429 chars, decoded = 65535
0 differences between src and decoded.
Testing wide character string::insert
Values[17]: 1234 49 50 3456 4567 3456 4567 2345 51 52 53 54 55 56 57 48 5678
Character offsets: 0 2 3 4 7 10 13 16 19 20 21 22 23 24 25 26 27
Erasing character 16: 1234 49 50 3456 4567 3456 4567 2345 51 52 53 54 55 56 57 48
6
Align(17,7) = 21
Align(14,7) = Erasing 2 characters after '2': 1234 49 50 3456 4567 2345 51 52 53 54 55 56 57 48
14

NextPow2(0) = 1
NextPow2(1) = 2
NextPow2(4) = 4
NextPow2(3827) = 4096
NextPow2(0xFFFFFFF0) = 1

advance(42,0) = 42
advance(42,3) = 45
cvp = 1234
vp = 4321
advance(cvp,5) = 1,58d0
< ========================================
< Testing 4x4 int matrix:
< ========================================
< load_identity(m1)
< m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
< m1 = m2
< m2 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
1239
advance(vp,4) = 4325
distance(cvp,vp) = 30ED
abs_distance(vp,cvp) = ========================================

Testing 4x4 int matrix:

30ED

size_of_elements(3, c_Numbers) = 12
VectorSize(c_Numbers[5]) = 5
VectorSize(c_Numbers[0]) = < m1 += m2
load_identity(m1)
m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
m1 = m2
m2 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
m1 += m2
m1 = ((2,0,0,0)(0,2,0,0)(0,0,2,0)(0,0,0,2))
m1 /= 2
m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
m1 = m1 * m2
m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
m1 += 3
m1 = ((4,3,3,3)(3,4,3,3)(3,3,4,3)(3,3,3,4))
m1 *= I(2)
m1 = ((8,6,6,6)(6,8,6,6)(6,6,8,6)(6,6,6,8))
m1 = iota(1)
m1 = ((1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15,16))
m1 row [1] = (5,6,7,8)
m1 column [2] = (3,7,11,15)
m1 *= I(2)
m1 = ((2,4,6,8)(10,12,14,16)(18,20,22,24)(26,28,30,32))
v = iota(1)
v = (1,2,3,4)
m2 = I(2) + T(1)
m2 = ((2,0,0,0)(0,2,0,0)(0,0,2,0)(1,1,1,2))
vt = v * m2

vt = (6,8,10,8)

Testing 4x4 float matrix:

load_identity(m1)
m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
m1 = m2
m2 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
m1 += m2
m1 = ((2.0,0.0,0.0,0.0)(0.0,2.0,0.0,0.0)(0.0,0.0,2.0,0.0)(0.0,0.0,0.0,2.0))
m1 /= 2
m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
m1 = m1 * m2
m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
m1 += 3
m1 = ((4.0,3.0,3.0,3.0)(3.0,4.0,3.0,3.0)(3.0,3.0,4.0,3.0)(3.0,3.0,3.0,4.0))
m1 *= I(2)
m1 = ((8.0,6.0,6.0,6.0)(6.0,8.0,6.0,6.0)(6.0,6.0,8.0,6.0)(6.0,6.0,6.0,8.0))
m1 = iota(1)
m1 = ((1.0,2.0,3.0,4.0)(5.0,6.0,7.0,8.0)(9.0,10.0,11.0,12.0)(13.0,14.0,15.0,16.0))
m1 row [1] = (5.0,6.0,7.0,8.0)
m1 column [2] = (3.0,7.0,11.0,15.0)
m1 *= I(2)
m1 = ((2.0,4.0,6.0,8.0)(10.0,12.0,14.0,16.0)(18.0,20.0,22.0,24.0)(26.0,28.0,30.0,32.0))
v = iota(1)
v = (1.0,2.0,3.0,4.0)
m2 = I(2) + T(1)
m2 = ((2.0,0.0,0.0,0.0)(0.0,2.0,0.0,0.0)(0.0,0.0,2.0,0.0)(1.0,1.0,1.0,2.0))
vt = v * m2
vt = (6.0,8.0,10.0,8.0)
0

BitsInType(uint32_t) = 32
BitsInType(int16_t) = 16
BitsInType(char) = 8

BitMask(uint32_t,12) = < m1 = ((2,0,0,0)(0,2,0,0)(0,0,2,0)(0,0,0,2))
< m1 /= 2
< m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
< m1 = m1 * m2
< m1 = ((1,0,0,0)(0,1,0,0)(0,0,1,0)(0,0,0,1))
< m1 += 3
< m1 = ((4,3,3,3)(3,4,3,3)(3,3,4,3)(3,3,3,4))
< m1 *= I(2)
< m1 = ((8,6,6,6)(6,8,6,6)(6,6,8,6)(6,6,6,8))
< m1 = iota(1)
< m1 = ((1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15,16))
< m1 row [1] = (5,6,7,8)
< m1 column [2] = (3,7,11,15)
< m1 *= I(2)
< m1 = ((2,4,6,8)(10,12,14,16)(18,20,22,24)(26,28,30,32))
< v = iota(1)
< v = (1,2,3,4)
< m2 = I(2) + T(1)
< m2 = ((2,0,0,0)(0,2,0,0)(0,0,2,0)(1,1,1,2))
< vt = v * m2
< vt = (6,8,10,8)
< ========================================
< Testing 4x4 float matrix:
FFF
BitMask(uint16_t,1) = 1
BitMask(uint8_t,8) = FF
BitMask(uint16_t,0) = 0

pack_type(uint8_t, uint16_t) = 4242
pack_type(uint8_t, uint32_t) = 42424242
pack_type(uint16_t, uint32_t) = 42434243
pack_type(uint8_t, uint64_t) = < ========================================
< load_identity(m1)
< m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
< m1 = m2
< m2 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
< m1 += m2
< m1 = ((2.0,0.0,0.0,0.0)(0.0,2.0,0.0,0.0)(0.0,0.0,2.0,0.0)(0.0,0.0,0.0,2.0))
< m1 /= 2
< m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
< m1 = m1 * m2
< m1 = ((1.0,0.0,0.0,0.0)(0.0,1.0,0.0,0.0)(0.0,0.0,1.0,0.0)(0.0,0.0,0.0,1.0))
< m1 += 3
< m1 = ((4.0,3.0,3.0,3.0)(3.0,4.0,3.0,3.0)(3.0,3.0,4.0,3.0)(3.0,3.0,3.0,4.0))
< m1 *= I(2)
< m1 = ((8.0,6.0,6.0,6.0)(6.0,8.0,6.0,6.0)(6.0,6.0,8.0,6.0)(6.0,6.0,6.0,8.0))
< m1 = iota(1)
< m1 = ((1.0,2.0,3.0,4.0)(5.0,6.0,7.0,8.0)(9.0,10.0,11.0,12.0)(13.0,14.0,15.0,16.0))
< m1 row [1] = (5.0,6.0,7.0,8.0)
< m1 column [2] = (3.0,7.0,11.0,15.0)
< m1 *= I(2)
< m1 = ((2.0,4.0,6.0,8.0)(10.0,12.0,14.0,16.0)(18.0,20.0,22.0,24.0)(26.0,28.0,30.0,32.0))
< v = iota(1)
< v = (1.0,2.0,3.0,4.0)
< m2 = I(2) + T(1)
< m2 = ((2.0,0.0,0.0,0.0)(0.0,2.0,0.0,0.0)(0.0,0.0,2.0,0.0)(1.0,1.0,1.0,2.0))
< vt = v * m2
< vt = (6.0,8.0,10.0,8.0)
4242424242424242
pack_type(uint32_t, uint64_t) = 4243444542434445

bswap(1234) = 3412
le_to_native(1234) = ok
native_to_le(Running bvt/bvt23
1234) = ok
be_to_native(1234) = ok
native_to_be(1234) = ok
bswap(12345678) = 78563412
le_to_native(12345678) = ok
native_to_le(12345678) = ok
be_to_native(12345678) = ok
native_to_be(12345678) = ok
bswap(123456789ABCDEF0) = F0DEBC9A78563412
le_to_native(123456789ABCDEF0) = ok
native_to_le(123456789ABCDEF0) = ok
be_to_native(123456789ABCDEF0) = ok
native_to_be(123456789ABCDEF0) = ok

absv(12) = 12
absv(-12) = 12
sign(12) = 1
sign(-12) = -1
sign(0) = 0
min(3,4) = 3
min(6U,1U) = 1
max(-3,-6) = -3
max(-3L,6L) = ================================================

Testing uint8_t[8]

op1 = (2,2,2,2,2,2,2,2)
op2 = (1,2,3,4,5,6,7,8)
passign(op2,op3) = (1,2,3,4,5,6,7,8)
padd(op1,op2) = (3,4,5,6,7,8,9,10)
psub(op1,op2) = (1,2,3,4,5,6,7,8)
pmul(op1,op2) = (2,4,6,8,10,12,14,16)
pdiv(op1,op2) = (1,2,3,4,5,6,7,8)
pand(op1,op2) = (0,2,2,0,0,2,2,0)
por(op1,op2) = (3,2,3,6,7,6,7,10)
pxor(op1,op2) = (3,0,1,6,7,4,5,10)
pshl(op1,op2) = (4,8,12,16,20,24,28,' ')
pshr(op1,op2) = (0,0,0,1,1,1,1,2)
pmin(op3,op2) = (1,2,3,4,4,3,2,1)
pmax(op3,op2) = (8,7,6,5,5,6,7,8)

pavg(op3,op2) = (5,5,5,5,5,5,5,5)

Testing int8_t[8]

op1 = (2,2,2,2,2,2,2,2)
op2 = (1,2,3,4,5,6,7,8)
passign(op2,op3) = (1,2,3,4,5,6,7,8)
padd(op1,op2) = (3,4,5,6,7,8,9,10)
psub(op1,op2) = (1,2,3,4,5,6,7,8)
pmul(op1,op2) = (2,4,6,8,10,12,14,16)
pdiv(op1,op2) = (1,2,3,4,5,6,7,8)
pand(op1,op2) = (0,2,2,0,0,2,2,0)
por(op1,op2) = (3,2,3,6,7,6,7,10)
pxor(op1,op2) = (3,0,1,6,7,4,5,10)
pshl(op1,op2) = (4,8,12,16,20,24,28,' ')
pshr(op1,op2) = (0,0,0,1,1,1,1,2)
pmin(op3,op2) = (1,2,3,4,4,3,2,1)
pmax(op3,op2) = (8,7,6,5,5,6,7,8)

pavg(op3,op2) = (5,5,5,5,5,5,5,5)

Testing uint16_t[4]

op1 = (2,2,2,2)
op2 = (1,2,3,4)
passign(op2,op3) = (1,2,3,4)
padd(op1,op2) = (3,4,5,6)
psub(op1,op2) = (1,2,3,4)
pmul(op1,op2) = (2,4,6,8)
pdiv(op1,op2) = (1,2,3,4)
pand(op1,op2) = (0,2,2,0)
por(op1,op2) = (3,2,3,6)
pxor(op1,op2) = (3,0,1,6)
pshl(op1,op2) = (4,8,12,16)
pshr(op1,op2) = (0,0,0,1)
pmin(op3,op2) = (1,2,2,1)
pmax(op3,op2) = (4,3,3,4)

pavg(op3,op2) = (3,3,3,3)

Testing int16_t[4]

op1 = (2,2,2,2)
op2 = (1,2,3,4)
passign(op2,op3) = (1,2,3,4)
padd(op1,op2) = (3,4,5,6)
psub(op1,op2) = (1,2,3,4)
pmul(op1,op2) = (2,4,6,8)
pdiv(op1,op2) = (1,2,3,4)
pand(op1,op2) = (0,2,2,0)
por(op1,op2) = (3,2,3,6)
pxor(op1,op2) = (3,0,1,6)
pshl(op1,op2) = (4,8,12,16)
pshr(op1,op2) = (0,0,0,1)
pmin(op3,op2) = (1,2,2,1)
pmax(op3,op2) = (4,3,3,4)

pavg(op3,op2) = (3,3,3,3)

Testing uint32_t[2]

op1 = (2,2)
op2 = (1,2)
passign(op2,op3) = (1,2)
padd(op1,op2) = (3,4)
psub(op1,op2) = (1,2)
pmul(op1,op2) = (2,4)
pdiv(op1,op2) = (1,2)
pand(op1,op2) = (0,2)
por(op1,op2) = (3,2)
pxor(op1,op2) = (3,0)
pshl(op1,op2) = (4,8)
pshr(op1,op2) = (0,0)
pmin(op3,op2) = (1,1)
pmax(op3,op2) = (2,2)

pavg(op3,op2) = (2,2)

Testing int32_t[2]

op1 = (2,2)
op2 = (1,2)
passign(op2,op3) = (1,2)
padd(op1,op2) = (3,4)
psub(op1,op2) = (1,2)
pmul(op1,op2) = (2,4)
pdiv(op1,op2) = (1,2)
pand(op1,op2) = (0,2)
por(op1,op2) = (3,2)
pxor(op1,op2) = (3,0)
pshl(op1,op2) = (4,8)
pshr(op1,op2) = (0,0)
pmin(op3,op2) = (1,1)
pmax(op3,op2) = (2,2)

pavg(op3,op2) = (2,2)

Testing uint64_t[1]

op1 = (2)
op2 = (1)
passign(op2,op3) = (1)
padd(op1,op2) = (3)
psub(op1,op2) = (1)
pmul(op1,op2) = (2)
pdiv(op1,op2) = (1)
pand(op1,op2) = (0)
por(op1,op2) = (3)
pxor(op1,op2) = (3)
pshl(op1,op2) = (4)
pshr(op1,op2) = (0)
pmin(op3,op2) = (1)
pmax(op3,op2) = (1)

pavg(op3,op2) = (1)

Testing int64_t[1]

op1 = (2)
op2 = (1)
passign(op2,op3) = (1)
padd(op1,op2) = (3)
psub(op1,op2) = (1)
pmul(op1,op2) = (2)
pdiv(op1,op2) = (1)
pand(op1,op2) = (0)
por(op1,op2) = (3)
pxor(op1,op2) = (3)
pshl(op1,op2) = (4)
pshr(op1,op2) = (0)
pmin(op3,op2) = (1)
pmax(op3,op2) = (1)

pavg(op3,op2) = (1)

Testing float[2]

op1 = (2.00,2.00)
op2 = (1.00,2.00)
passign(op2,op3) = (1.00,2.00)
padd(op1,op2) = (3.00,4.00)
psub(op1,op2) = (1.00,2.00)
pmul(op1,op2) = (2.00,4.00)
pdiv(op1,op2) = (1.00,2.00)
pmin(op3,op2) = (1.00,1.00)
pmax(op3,op2) = (2.00,2.00)

pavg(op3,op2) = (1.50,1.50)

Testing float[4]

op1 = (2.00,2.00,2.00,2.00)
op2 = (1.00,2.00,3.00,4.00)
passign(op2,op3) = (1.00,2.00,3.00,4.00)
padd(op1,op2) = (3.00,4.00,5.00,6.00)
psub(op1,op2) = (1.00,2.00,3.00,4.00)
pmul(op1,op2) = (2.00,4.00,6.00,8.00)
pdiv(op1,op2) = (1.00,2.00,3.00,4.00)
pmin(op3,op2) = (1.00,2.00,2.00,1.00)
pmax(op3,op2) = (4.00,3.00,3.00,4.00)

pavg(op3,op2) = (2.50,2.50,2.50,2.50)

Testing uint32_t[7]

op1 = (2,2,2,2,2,2,2)
op2 = (1,2,3,4,5,6,7)
passign(op2,op3) = (1,2,3,4,5,6,7)
padd(op1,op2) = (3,4,5,6,7,8,9)
psub(op1,op2) = (1,2,3,4,5,6,7)
pmul(op1,op2) = (2,4,6,8,10,12,14)
pdiv(op1,op2) = (1,2,3,4,5,6,7)
pand(op1,op2) = (0,2,2,0,0,2,2)
por(op1,op2) = (3,2,3,6,7,6,7)
pxor(op1,op2) = (3,0,1,6,7,4,5)
pshl(op1,op2) = (4,8,12,16,20,24,28)
pshr(op1,op2) = (0,0,0,1,1,1,1)
pmin(op3,op2) = (1,2,3,4,3,2,1)
pmax(op3,op2) = (7,6,5,4,5,6,7)

pavg(op3,op2) = (4,4,4,4,4,4,4)

Testing fround int32_t -> float

(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)

(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)

Testing fround int32_t -> double

(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)

(-1,0,1,2) -> (-1.00,0.00,1.00,2.00)

Testing fround float -> int32_t

(-1.40,-0.40,0.60,1.60) -> (-1,0,1,2)
(-1.50,-0.50,0.50,1.50) -> (-2,0,0,2)

(-1.70,-0.70,0.30,1.30) -> (-2,-1,0,1)

Testing fround double -> int32_t

(-1.40,-0.40,0.60,1.60) -> (-1,0,1,2)
(-1.50,-0.50,0.50,1.50) -> (-2,0,0,2)

(-1.70,-0.70,0.30,1.30) -> (-2,-1,0,1)

Testing fcast float -> int32_t

(-1.40,-0.40,0.60,1.60) -> (-1,0,0,1)
(-1.50,-0.50,0.50,1.50) -> (-1,0,0,1)
(-1.70,-0.70,0.30,1.30) -> (-1,0,0,1)
6
1,218d0
< ================================================
< Testing uint8_t[8]
< ================================================
< op1 = (2,2,2,2,2,2,2,2)
< op2 = (1,2,3,4,5,6,7,8)
< passign(op2,op3) = (1,2,3,4,5,6,7,8)
< padd(op1,op2) = (3,4,5,6,7,8,9,10)
< psub(op1,op2) = (1,2,3,4,5,6,7,8)
< pmul(op1,op2) = (2,4,6,8,10,12,14,16)
< pdiv(op1,op2) = (1,2,3,4,5,6,7,8)
< pand(op1,op2) = (0,2,2,0,0,2,2,0)
< por(op1,op2) = (3,2,3,6,7,6,7,10)
< pxor(op1,op2) = (3,0,1,6,7,4,5,10)
< pshl(op1,op2) = (4,8,12,16,20,24,28,' ')
< pshr(op1,op2) = (0,0,0,1,1,1,1,2)
< pmin(op3,op2) = (1,2,3,4,4,3,2,1)
< pmax(op3,op2) = (8,7,6,5,5,6,7,8)
< pavg(op3,op2) = (5,5,5,5,5,5,5,5)
< ================================================
< Testing int8_t[8]
< ================================================
< op1 = (2,2,2,2,2,2,2,2)
< op2 = (1,2,3,4,5,6,7,8)
< passign(op2,op3) = (1,2,3,4,5,6,7,8)
< padd(op1,op2) = (3,4,5,6,7,8,9,10)
< psub(op1,op2) = (1,2,3,4,5,6,7,8)
< pmul(op1,op2) = (2,4,6,8,10,12,14,16)
< pdiv(op1,op2) = (1,2,3,4,5,6,7,8)
< pand(op1,op2) = (0,2,2,0,0,2,2,0)
< por(op1,op2) = (3,2,3,6,7,6,7,10)
< pxor(op1,op2) = (3,0,1,6,7,4,5,10)
< pshl(op1,op2) = (4,8,12,16,20,24,28,' ')
< pshr(op1,op2) = (0,0,0,1,1,1,1,2)
< pmin(op3,op2) = (1,2,3,4,4,3,2,1)
< pmax(op3,op2) = (8,7,6,5,5,6,7,8)
< pavg(op3,op2) = (5,5,5,5,5,5,5,5)
< ================================================
< Testing uint16_t[4]
< ================================================
< op1 = (2,2,2,2)
< op2 = (1,2,3,4)
< passign(op2,op3) = (1,2,3,4)
< padd(op1,op2) = (3,4,5,6)
< psub(op1,op2) = (1,2,3,4)
< pmul(op1,op2) = (2,4,6,8)
< pdiv(op1,op2) = (1,2,3,4)
< pand(op1,op2) = (0,2,2,0)
< por(op1,op2) = (3,2,3,6)
< pxor(op1,op2) = (3,0,1,6)
< pshl(op1,op2) = (4,8,12,16)
< pshr(op1,op2) = (0,0,0,1)
< pmin(op3,op2) = (1,2,2,1)
< pmax(op3,op2) = (4,3,3,4)
< pavg(op3,op2) = (3,3,3,3)
< ================================================
< Testing int16_t[4]
< ================================================
< op1 = (2,2,2,2)
< op2 = (1,2,3,4)
< passign(op2,op3) = (1,2,3,4)
< padd(op1,op2) = (3,4,5,6)
< psub(op1,op2) = (1,2,3,4)
< pmul(op1,op2) = (2,4,6,8)
< pdiv(op1,op2) = (1,2,3,4)
< pand(op1,op2) = (0,2,2,0)
< por(op1,op2) = (3,2,3,6)
< pxor(op1,op2) = (3,0,1,6)
< pshl(op1,op2) = (4,8,12,16)
< pshr(op1,op2) = (0,0,0,1)
< pmin(op3,op2) = (1,2,2,1)
< pmax(op3,op2) = (4,3,3,4)
< pavg(op3,op2) = (3,3,3,3)
< ================================================
< Testing uint32_t[2]
< ================================================
< op1 = (2,2)
< op2 = (1,2)
< passign(op2,op3) = (1,2)
< padd(op1,op2) = (3,4)
< psub(op1,op2) = (1,2)
< pmul(op1,op2) = (2,4)
< pdiv(op1,op2) = (1,2)
< pand(op1,op2) = (0,2)
< por(op1,op2) = (3,2)
< pxor(op1,op2) = (3,0)
< pshl(op1,op2) = (4,8)
< pshr(op1,op2) = (0,0)
< pmin(op3,op2) = (1,1)
< pmax(op3,op2) = (2,2)
< pavg(op3,op2) = (2,2)
< ================================================
< Testing int32_t[2]
< ================================================
< op1 = (2,2)
< op2 = (1,2)
< passign(op2,op3) = (1,2)
< padd(op1,op2) = (3,4)
< psub(op1,op2) = (1,2)
< pmul(op1,op2) = (2,4)
< pdiv(op1,op2) = (1,2)
< pand(op1,op2) = (0,2)
< por(op1,op2) = (3,2)
< pxor(op1,op2) = (3,0)
< pshl(op1,op2) = (4,8)
< pshr(op1,op2) = (0,0)
< pmin(op3,op2) = (1,1)
< pmax(op3,op2) = (2,2)
< pavg(op3,op2) = (2,2)
< ================================================
< Testing uint64_t[1]
< ================================================
< op1 = (2)
< op2 = (1)
< passign(op2,op3) = (1)
< padd(op1,op2) = (3)
< psub(op1,op2) = (1)
< pmul(op1,op2) = (2)
< pdiv(op1,op2) = (1)
< pand(op1,op2) = (0)
< por(op1,op2) = (3)
< pxor(op1,op2) = (3)
< pshl(op1,op2) = (4)
< pshr(op1,op2) = (0)
< pmin(op3,op2) = (1)
< pmax(op3,op2) = (1)
< pavg(op3,op2) = (1)
< ================================================
< Testing int64_t[1]
< ================================================
< op1 = (2)
< op2 = (1)
< passign(op2,op3) = (1)
< padd(op1,op2) = (3)
< psub(op1,op2) = (1)
< pmul(op1,op2) = (2)
< pdiv(op1,op2) = (1)
< pand(op1,op2) = (0)
< por(op1,op2) = (3)
< pxor(op1,op2) = (3)
< pshl(op1,op2) = (4)
< pshr(op1,op2) = (0)
< pmin(op3,op2) = (1)
< pmax(op3,op2) = (1)
< pavg(op3,op2) = (1)
< ================================================
< Testing float[2]
< ================================================
< op1 = (2.00,2.00)
< op2 = (1.00,2.00)
< passign(op2,op3) = (1.00,2.00)
< padd(op1,op2) = (3.00,4.00)
< psub(op1,op2) = (1.00,2.00)
< pmul(op1,op2) = (2.00,4.00)
< pdiv(op1,op2) = (1.00,2.00)
< pmin(op3,op2) = (1.00,1.00)
< pmax(op3,op2) = (2.00,2.00)
< pavg(op3,op2) = (1.50,1.50)
< ================================================
< Testing float[4]
< ================================================
< op1 = (2.00,2.00,2.00,2.00)
< op2 = (1.00,2.00,3.00,4.00)
< passign(op2,op3) = (1.00,2.00,3.00,4.00)
< padd(op1,op2) = (3.00,4.00,5.00,6.00)
< psub(op1,op2) = (1.00,2.00,3.00,4.00)
< pmul(op1,op2) = (2.00,4.00,6.00,8.00)
< pdiv(op1,op2) = (1.00,2.00,3.00,4.00)
< pmin(op3,op2) = (1.00,2.00,2.00,1.00)
< pmax(op3,op2) = (4.00,3.00,3.00,4.00)
< pavg(op3,op2) = (2.50,2.50,2.50,2.50)
< ================================================
< Testing uint32_t[7]
< ================================================
< op1 = (2,2,2,2,2,2,2)
< op2 = (1,2,3,4,5,6,7)
< passign(op2,op3) = (1,2,3,4,5,6,7)
< padd(op1,op2) = (3,4,5,6,7,8,9)
< psub(op1,op2) = (1,2,3,4,5,6,7)
< pmul(op1,op2) = (2,4,6,8,10,12,14)
< pdiv(op1,op2) = (1,2,3,4,5,6,7)
< pand(op1,op2) = (0,2,2,0,0,2,2)
< por(op1,op2) = (3,2,3,6,7,6,7)
< pxor(op1,op2) = (3,0,1,6,7,4,5)
< pshl(op1,op2) = (4,8,12,16,20,24,28)
< pshr(op1,op2) = (0,0,0,1,1,1,1)
< pmin(op3,op2) = (1,2,3,4,3,2,1)
< pmax(op3,op2) = (7,6,5,4,5,6,7)
< pavg(op3,op2) = (4,4,4,4,4,4,4)
< ================================================
< Testing fround int32_t -> float
< ================================================
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< ================================================
< Testing fround int32_t -> double
< ================================================
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< (-1,0,1,2) -> (-1.00,0.00,1.00,2.00)
< ================================================
< Testing fround float -> int32_t
< ================================================
< (-1.40,-0.40,0.60,1.60) -> (-1,0,1,2)
< (-1.50,-0.50,0.50,1.50) -> (-2,0,0,2)
< (-1.70,-0.70,0.30,1.30) -> (-2,-1,0,1)
< ================================================
< Testing fround double -> int32_t
< ================================================
< (-1.40,-0.40,0.60,1.60) -> (-1,0,1,2)
< (-1.50,-0.50,0.50,1.50) -> (-2,0,0,2)
< (-1.70,-0.70,0.30,1.30) -> (-2,-1,0,1)
< ================================================
< Testing fcast float -> int32_t
< ================================================
< (-1.40,-0.40,0.60,1.60) -> (-1,0,0,1)
< (-1.50,-0.50,0.50,1.50) -> (-1,0,0,1)
< (-1.70,-0.70,0.30,1.30) -> (-1,0,0,1)

Running bvt/bvt24

93

93

92

93

92 90

 93

92 90

86

1,180d0
< ------------------------------------------------
< 93
93
92 90

86 83

 93

92 90

86 83 86

< ------------------------------------------------
< 93
< 92
< ------------------------------------------------
< 93
< 92 90
< ------------------------------------------------
< 93
< 92 90
< 86
< ------------------------------------------------
< 93
< 92 90
< 86 83
< ------------------------------------------------
< 93
< 92 90
< 86 83 86
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35 23
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35 23 59
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35 23 59 35
< ------------------------------------------------
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35 23 59 35 29
< ------------------------------------------------
< make_heap on the full range:
< 93
< 92 90
< 86 83 86 77
< 40 72 36 68 82 62 67 63
< 15 26 26 49 21 11 62 67 27 29 30 35 23 59 35 29
< ------------------------------------------------
< pop_heap:
< 92
< 86 90
< 72 83 86 77
< 40 49 36 68 82 62 67 63
< 15 26 26 29 21 11 62 67 27 29 30 35 23 59 35
< ------------------------------------------------
< sort_heap:
< 11 15 21 23 26 26 27 29 29 30 35 35 36 40 49 59 62 62 63 67 67 68 72 77 82 83 86 86 90 92 93
< ------------------------------------------------
< priority_queue push and pop:
< 93 92 90 86 86 83 82 77 72 68 67 67 63 62 62 59 49 40 36 35 35 30 29 29 27 26 26 23 21 15 11
93
92 90

86 83 86 77

Running bvt/bvt25
93
92 90
86 83 86 77

40

       93
 92          90

86 83 86 77

40 72

Hello world!
123 456 789
two words
and three words
and even four words
93
92 90
86 83 86 77

40 72 36

       93
 92          90

86 83 86 77

40 72 36 68

       93
 92          90

86 83 86 77

40 72 36 68 82

       93
 92          90

86 83 86 77

40 72 36 68 82 62

       93
 92          90

86 83 86 77

40 72 36 68 82 62 67

       93
 92          90

86 83 86 77

40 72 36 68 82 62 67 63

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26

1,5d0
< Hello world!
< 123 456 789
< two words
< and three words
< and even four words
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49

Running bvt/bvt26
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11

123456789
1
12
123
1234
12345
123456
1234567
12345678
123456789
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67

1,10d0
< 123456789
< 1
< 12
< 123
< 1234
< 12345
< 123456
< 1234567
< 12345678
< 123456789
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27

Running bvt/bvt27
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30


Testing functionality from typet.h

sizeof(NullType) = 1
Int2Type(42)::value = 42
Type2Type type value = 56
int == int is true
float == int is false
PrintInt 567
Base is SuperSubclass from Derived is true
Base is SuperSubclass from Base is true
Base is SuperSubclassStrict from Derived is true
Base is SuperSubclassStrict from Base is false


Testing functionality from typelist.h

Length of IntTypesList is 4
PrintShort 1234
PrintFloat 1235.00
PrintShort 1236
Index of double in AllTypesList is 5
Index of float in NoFloatList is -1
Index of double in NoFloatList is 4
Index of double in ReversedList is 0
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35 23

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35 23 59

                   93
       92                      90
 86          83          86          77

40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35 23 59 35

1,25d0
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35 23 59 35 29

make_heap on the full range:
93
92 90
86 83 86 77
40 72 36 68 82 62 67 63

15 26 26 49 21 11 62 67 27 29 30 35 23 59 35 29

pop_heap:
92
86 90
72 83 86 77
40 49 36 68 82 62 67 63

15 26 26 29 21 11 62 67 27 29 30 35 23 59 35

sort_heap:

11 15 21 23 26 26 27 29 29 30 35 35 36 40 49 59 62 62 63 67 67 68 72 77 82 83 86 86 90 92 93

priority_queue push and pop:
93 92 90 86 86 83 82 77 72 68 67< ----------------------------------------------------------------------
67 63 62 62 59 49 40 36 35 35 30 29 29 27 26 26 23 21 15 11
< Testing functionality from typet.h
< ----------------------------------------------------------------------
< sizeof(NullType) = 1
< Int2Type(42)::value = 42
< Type2Type type value = 56
< int == int is true
< float == int is false
< PrintInt 567
< Base is SuperSubclass from Derived is true
< Base is SuperSubclass from Base is true
< Base is SuperSubclassStrict from Derived is true
< Base is SuperSubclassStrict from Base is false
<
< ----------------------------------------------------------------------
< Testing functionality from typelist.h
< ----------------------------------------------------------------------
< Length of IntTypesList is 4
< PrintShort 1234
< PrintFloat 1235.00
< PrintShort 1236
< Index of double in AllTypesList is 5
< Index of float in NoFloatList is -1
< Index of double in NoFloatList is 4
< Index of double in ReversedList is 0

Running bvt/bvt28

Testing array<float,4>
================================================1,184d0
< ================================================
< Testing array<float,4>
< ================================================
< pt1: size = 4, value = (1.00,2.00,3.00,4.00)
< pt2: (5.00,6.00,7.00,8.00)
< pt2: (10.00,11.00,12.00,13.00)
< pt1 *= 3: (3.00,6.00,9.00,12.00)

pt1: size = 4, value = (1.00,2.00,3.00,4.00)
pt2: (5.00,6.00,7.00,8.00)
pt2: < pt1 /= 3: (1.00,2.00,3.00,4.00)
< pt1 += 3: (4.00,5.00,6.00,7.00)
< pt1 -= 3: (1.00,2.00,3.00,4.00)
< pt1 *= pt2: (10.00,22.00,36.00,52.00)
< pt1 /= pt2: (1.00,2.00,3.00,4.00)
< pt1 += pt2: (11.00,13.00,15.00,17.00)
< pt1 -= pt2: (1.00,2.00,3.00,4.00)
< pt1 = pt1 * pt2: (10.00,22.00,36.00,52.00)
< pt1 = pt1 / pt2: (1.00,2.00,3.00,4.00)
< pt1 = pt1 + pt2: (11.00,13.00,15.00,17.00)
< pt1 = pt1 - pt2: (1.00,2.00,3.00,4.00)
< ================================================
< Testing array<float,2>
< ================================================
< pt1: size = 2, value = (1.00,2.00)
< pt2: (5.00,6.00)
< pt2: (10.00,11.00)
< pt1 *= 3: (3.00,6.00)
< pt1 /= 3: (1.00,2.00)
< pt1 += 3: (4.00,5.00)
< pt1 -= 3: (1.00,2.00)
< pt1 *= pt2: (10.00,22.00)
< pt1 /= pt2: (1.00,2.00)
< pt1 += pt2: (11.00,13.00)
< pt1 -= pt2: (1.00,2.00)
< pt1 = pt1 * pt2: (10.00,22.00)
< pt1 = pt1 / pt2: (1.00,2.00)
< pt1 = pt1 + pt2: (11.00,13.00)
< pt1 = pt1 - pt2: (1.00,2.00)
< ================================================
< Testing array<int32_t,4>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
(10.00,11.00,12.00,13.00)
pt1 *= 3: (3.00,6.00,9.00,12.00)
pt1 /= 3: (1.00,2.00,3.00,4.00)
pt1 += 3: < pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing array<uint32_t,4>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
(4.00,5.00,6.00,7.00)
pt1 -= 3: (1.00,2.00,3.00,4.00)
pt1 *= pt2: (10.00,22.00,36.00,52.00)
pt1 /= pt2: < pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
< pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing array<int32_t,2>
< ================================================
< pt1: size = 2, value = (1,2)
< pt2: (5,6)
< pt2: (10,11)
< pt1 *= 3: (3,6)
< pt1 /= 3: (1,2)
< pt1 += 3: (4,5)
< pt1 -= 3: (1,2)
(1.00,2.00,3.00,4.00)
pt1 += pt2: (11.00,13.00,15.00,17.00)
pt1 -= pt2: (1.00,2.00,3.00,4.00)
pt1 = pt1 * pt2: < pt1 *= pt2: (10,22)
< pt1 /= pt2: (1,2)
< pt1 += pt2: (11,13)
< pt1 -= pt2: (1,2)
< pt1 = pt1 * pt2: (10,22)
(10.00,22.00,36.00,52.00)
pt1 = pt1 / pt2: (1.00,2.00,3.00,4.00)
pt1 = pt1 + pt2: (11.00,13.00,15.00,17.00)

pt1 = pt1 - pt2: (1.00,2.00,3.00,4.00)

Testing array<float,2>
================================================< pt1 = pt1 / pt2: (1,2)
< pt1 = pt1 + pt2: (11,13)
< pt1 = pt1 - pt2: (1,2)
< ================================================
< Testing array<uint32_t,2>
< ================================================
< pt1: size = 2, value = (1,2)
< pt2: (5,6)
< pt2: (10,11)
< pt1 *= 3: (3,6)
< pt1 /= 3: (1,2)
< pt1 += 3: (4,5)
< pt1 -= 3: (1,2)
< pt1 *= pt2: (10,22)
< pt1 /= pt2: (1,2)
< pt1 += pt2: (11,13)
< pt1 -= pt2: (1,2)
< pt1 = pt1 * pt2: (10,22)
< pt1 = pt1 / pt2: (1,2)
< pt1 = pt1 + pt2: (11,13)
< pt1 = pt1 - pt2: (1,2)
< ================================================
< Testing array<int16_t,4>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
< pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing array<uint16_t,4>
< ================================================
< pt1: size = 4, value = (1,2,3,4)
< pt2: (5,6,7,8)
< pt2: (10,11,12,13)
< pt1 *= 3: (3,6,9,12)
< pt1 /= 3: (1,2,3,4)
< pt1 += 3: (4,5,6,7)
< pt1 -= 3: (1,2,3,4)
< pt1 *= pt2: (10,22,36,52)
< pt1 /= pt2: (1,2,3,4)
< pt1 += pt2: (11,13,15,17)
< pt1 -= pt2: (1,2,3,4)
< pt1 = pt1 * pt2: (10,22,36,52)
< pt1 = pt1 / pt2: (1,2,3,4)
< pt1 = pt1 + pt2: (11,13,15,17)
< pt1 = pt1 - pt2: (1,2,3,4)
< ================================================
< Testing array<int8_t,8>
< ================================================
< pt1: size = 8, value = (1,2,3,4,5,6,7,8)
< pt2: (5,6,7,8,5,6,7,8)
< pt2: (10,11,12,13,14,15,16,17)
< pt1 *= 3: (3,6,9,12,15,18,21,24)
< pt1 /= 3: (1,2,3,4,5,6,7,8)
< pt1 += 3: (4,5,6,7,8,9,10,11)
< pt1 -= 3: (1,2,3,4,5,6,7,8)
< pt1 *= pt2: (10,22,'$','4','F','Z','p',-120)
< pt1 /= pt2: (1,2,3,4,5,6,7,-7)
< pt1 += pt2: (11,13,15,17,19,21,23,10)
< pt1 -= pt2: (1,2,3,4,5,6,7,-7)
< pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',-119)
< pt1 = pt1 / pt2: (1,2,3,4,5,6,7,-7)
< pt1 = pt1 + pt2: (11,13,15,17,19,21,23,10)
< pt1 = pt1 - pt2: (1,2,3,4,5,6,7,-7)
< ================================================
< Testing array<uint8_t,8>

pt1: size = 2, value = (1.00,2.00)
pt2: (5.00,6.00)
pt2: (10.00,11.00)
pt1 *= 3: (3.00,6.00)
pt1 /= 3: (1.00,2.00)
pt1 += 3: (4.00,5.00)
pt1 -= 3: (1.00,2.00)
pt1 *= pt2: (10.00,22.00)
pt1 /= pt2: (1.00,2.00)
pt1 += pt2: (11.00,13.00)
pt1 -= pt2: (1.00,2.00)
pt1 = pt1 * pt2: (10.00,22.00)
pt1 = pt1 / pt2: (1.00,2.00)
pt1 = pt1 + pt2: (11.00,13.00)

pt1 = pt1 - pt2: (1.00,2.00)

Testing array<int32_t,4>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing array<uint32_t,4>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing array<int32_t,2>

pt1: size = 2, value = (1,2)
pt2: (5,6)
pt2: (10,11)
pt1 *= 3: (3,6)
pt1 /= 3: (1,2)
pt1 += 3: (4,5)
pt1 -= 3: (1,2)
pt1 *= pt2: (10,22)
pt1 /= pt2: (1,2)
pt1 += pt2: (11,13)
pt1 -= pt2: (1,2)
pt1 = pt1 * pt2: (10,22)
pt1 = pt1 / pt2: (1,2)
pt1 = pt1 + pt2: (11,13)

pt1 = pt1 - pt2: (1,2)

Testing array<uint32_t,2>

pt1: size = 2, value = (1,2)
pt2: (5,6)
pt2: (10,11)
pt1 *= 3: (3,6)
pt1 /= 3: (1,2)
pt1 += 3: (4,5)
pt1 -= 3: (1,2)
pt1 *= pt2: (10,22)
pt1 /= pt2: (1,2)
pt1 += pt2: (11,13)
pt1 -= pt2: (1,2)
pt1 = pt1 * pt2: (10,22)
pt1 = pt1 / pt2: (1,2)
pt1 = pt1 + pt2: (11,13)

pt1 = pt1 - pt2: (1,2)

Testing array<int16_t,4>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing array<uint16_t,4>

pt1: size = 4, value = (1,2,3,4)
pt2: (5,6,7,8)
pt2: (10,11,12,13)
pt1 *= 3: (3,6,9,12)
pt1 /= 3: (1,2,3,4)
pt1 += 3: (4,5,6,7)
pt1 -= 3: (1,2,3,4)
pt1 *= pt2: (10,22,36,52)
pt1 /= pt2: (1,2,3,4)
pt1 += pt2: (11,13,15,17)
pt1 -= pt2: (1,2,3,4)
pt1 = pt1 * pt2: (10,22,36,52)
pt1 = pt1 / pt2: (1,2,3,4)
pt1 = pt1 + pt2: (11,13,15,17)

pt1 = pt1 - pt2: (1,2,3,4)

Testing array<int8_t,8>

pt1: size = 8, valu< ================================================
< pt1: size = 8, value = (1,2,3,4,5,6,7,8)
< pt2: (5,6,7,8,5,6,7,8)
< pt2: (10,11,12,13,14,15,16,17)
< pt1 *= 3: (3,6,9,12,15,18,21,24)
< pt1 /= 3: (1,2,3,4,5,6,7,8)
< pt1 += 3: (4,5,6,7,8,9,10,11)
< pt1 -= 3: (1,2,3,4,5,6,7,8)
< pt1 *= pt2: (10,22,'$','4','F','Z','p',136)
< pt1 /= pt2: (1,2,3,4,5,6,7,8)
< pt1 += pt2: (11,13,15,17,19,21,23,25)
< pt1 -= pt2: (1,2,3,4,5,6,7,8)
< pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',136)
< pt1 = pt1 / pt2: (1,2,3,4,5,6,7,8)
< pt1 = pt1 + pt2: (11,13,15,17,19,21,23,25)
< pt1 = pt1 - pt2: (1,2,3,4,5,6,7,8)
< ================================================
e = (1,2,3,4,5,6,7,8)
pt2: (5,6,7,8,5,6,7,8)
pt2: (10,11,12,13,14,15,16,17)
pt1 *= 3: (3,6,9,12,15,18,21,24)
pt1 /= 3: (1,2,3,4,5,6,7,8)
pt1 += 3: (4,5,6,7,8,9,10,11)
pt1 -= 3: (1,2,3,4,5,6,7,8)
pt1 *= pt2: (10,22,'$','4','F','Z','p',-120)
pt1 /= pt2: (1,2,3,4,5,6,7,-7)
pt1 += pt2: (11,13,15,17,19,21,23,10)
pt1 -= pt2: (1,2,3,4,5,6,7,-7)
pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',-119)
pt1 = pt1 / pt2: (1,2,3,4,5,6,7,-7)
pt1 = pt1 + pt2: (11,13,15,17,19,21,23,10)

pt1 = pt1 - pt2: (1,2,3,4,5,6,7,-7)

Testing array<uint8_t,8>

pt1: size = 8, value = (1,2,3,4,5,6,7,8)
pt2: (5,6,7,8,5,6,7,8)
pt2: (10,11,12,13,14,15,16,17)
pt1 *= 3: (3,6,9,< Testing array<string,3>
< ================================================
< str: (str0,str1,str2)
12,15,18,21,24)
pt1 /= 3: (1,2,3,4,5,6,7,8)
pt1 += 3: (4,5,6,7,8,9,10,11)
pt1 -= 3: (1,2,3,4,5,6,7,8)
pt1 *= pt2: (10,22,'$','4','F','Z','p',136)
pt1 /= pt2: (1,2,3,4,5,6,7,8)
pt1 += pt2: (11,13,15,17,19,21,23,25)
pt1 -= pt2: (1,2,3,4,5,6,7,8)
pt1 = pt1 * pt2: (10,22,'$','4','F','Z','p',136)
pt1 = pt1 / pt2: (1,2,3,4,5,6,7,8)
pt1 = pt1 + pt2: (11,13,15,17,19,21,23,25)

pt1 = pt1 - pt2: (1,2,3,4,5,6,7,8)

Testing array<string,3>

str: (str0,str1,str2)

Running bvt/bvt29

Testing type traits

true1,170d0
= is_void
false = is_void
false = is_void<void*>
false = is_void
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true< ----------------------------------------------------------------------
< Testing type traits
< ----------------------------------------------------------------------
< true = is_void
< false = is_void
< false = is_void<void*>
< false = is_void
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< true = is_integral
< false = is_integral
< false = is_integral<void*>
< false = is_integral
< false = is_integral<TTA*>
< true = is_floating_point
< true = is_floating_point
< false = is_floating_point
< false = is_array
< true = is_array<int[4]>
< true = is_array<int[2][4]>
= is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral
true = is_integral< true = is_array<const char[]>
< false = is_pointer
< true = is_pointer<void*>
< true = is_pointer<TTA*>
< false = is_lvalue_reference

false = is_integral
false = is_integral<void*>
false = is_integral
false = is_integral<TTA*>
true = is_floating_point
true = is_floating_point
false = is_floating_point
false = is_array
true = is_array<int[4]>
true = is_array<int[2][4]>
true = is_array<const char[]>
false = is_pointer
true = is_pointer<void*>
true = is_pointer<TTA*>
false = is_lvalue_reference
true = is_lvalue_reference<int&>
true = is_lvalue_reference<void*&>
true = is_lvalue_reference<volatile float&>
false = is_rvalue_reference
true = is_rvalue_reference<int&&>
false = is_rvalue_reference<void*&>
true = is_rvalue_reference<volatile float&&>
false = is_reference
true = is_reference<int&>
true = is_reference<void*&>
true = is_reference<volatile float&>
false = is_member_object_pointer
false = is_member_function_pointer
true = is_member_function_pointer<void (TTA::)(void)>
true = is_enum
false = is_enum
false = is_enum
true = is_class
false = is_class
false = is_function
false = is_function<void (
)(int)>
true = is_function<decltype(Print)>
false = is_function<void (TTA::)(void)>
true = is_arithmetic
true = is_arithmetic
true = is_arithmetic
false = is_arithmetic
false = is_arithmetic
false = is_floating_point
true = is_floating_point
true = is_floating_point
false = is_floating_point
true = is_object
true = is_object
true = is_object
true = is_object
true = is_scalar
true = is_scalar
false = is_scalar
true = is_scalar
false = is_compound
false = is_compound
true = is_compound
true = is_compound
true = is_member_pointer<void (TTA::
)(void)>
false = is_member_pointer<void*>
false = is_const
true = is_const
true = is_const
false = is_volatile
false = is_volatile
true = is_volatile
true = is_pod
true = is_pod<int[15]>
true = is_pod
false = is_pod
false = is_empty
true = is_empty
true = is_empty
true = has_trivial_constructor
false = has_trivial_constructor
true = has_trivial_copy
false = has_trivial_copy
true = has_trivial_assign
false = has_trivial_assign
true = has_trivial_destructor
false = has_trivial_destructor
true = is_signed
false = is_signed
true = is_signed
false = is_unsigned
true = < true = is_lvalue_reference<int&>
is_unsigned
false = is_unsigned
true = sizeof(char) == alignment_of
true = sizeof(short) == alignment_of
true = sizeof(int) == alignment_of
true = sizeof(void_) == alignment_of<void_>
true = sizeof(double) == alignment_of
true = sizeof(char) == alignment_of
true = 0 == rank
true = 1 == rank<int[1]>
true = 2 == rank<int[][2]>
true = 3 == rank<int[1][2][3]>
true = 0 == extent
true = 1 == extent<int[1]>
true = 1 == extent<int[1][2]>
true = 2 == extent<int[][2],1>
true = 1 == extent<int[1][2][3]>
true = 2 == extent<int[1][2][3],1>
true = 3 == extent<int[1][2][3],2>
true = is_same<int,int>
false = is_same<int,unsigned int>
false = is_base_of<int,unsigned int>
true = is_base_of<TTA,TTB>
false = is_base_of<TTA,Polymorphic>
true = is_convertible<int,unsigned int>
true = is_convertible<TTA,TTA>
false = is_convertible<TTA*,TTB*>
true = is_convertible<TTB*,TTA*>
true = is_same<remove_const::type,int>
false = is_same<remove_const::type,int>
false = is_same<remove_volatile::type,int>
false = is_same<remove_volatile::type,int>
false = is_same<add_const::type,volatile int>
true = is_same<add_const::type,const volatile int>
true = is_same<add_volatile::type,volatile int>
true = is_same<add_volatile::type,const volatile int>
true = is_same<add_cv::type,const volatile int>
true = is_same<remove_pointer<int*>::type,int>
true = is_same<remove_reference<const int&>::type,const int>
true = is_same<remove_reference<const volatile int&>::type,const volatile int>
true = is_same<add_pointer::type,int_>
true = is_same<add_lvalue_reference::type,volatile int&>
true = is_same<add_rvalue_reference::type,int&&>
true = is_same<remove_extent::type,int>
true = is_same<remove_extent<int[2][3]>::type,int[3]>
true = is_same<remove_extent<int[][3]>::type,int[3]>
true = is_same<remove_extent<int[3]>::type,int>
true = is_same<remove_all_extents::type,int>
true = is_same<remove_all_extents<int[2][3]>::type,int>
true = is_same<remove_all_extents<int[3]>::type,int>
false = has_member_function_Function
true = has_member_function_Function
false = has_member_function_read
true = has_member_function_read<vector>
true = has_static_member_variable_s_var
false = has_static_member_variable_s_invalid
aligned_storage<1,1>::type: sizeof 1, alignof 1
aligned_storage<2,1>::type: sizeof 2, alignof 1
aligned_storage<2,2>::type: sizeof 2, alignof 2
aligned_storage<2,4>::type: sizeof 4, alignof 4
aligned_storage<5,4>::type: sizeof 8, alignof 4
aligned_storage<16,8>::type: sizeof 16, alignof 8
< true = is_lvalue_reference<void_&>
< true = is_lvalue_reference<volatile float&>
aligned_storage<17,16>::type: sizeof 32, alignof 16
< false = is_rvalue_reference
< true = is_rvalue_reference<int&&>
< false = is_rvalue_reference<void*&>
< true = is_rvalue_reference<volatile float&&>
< false = is_reference
< true = is_reference<int&>
< true = is_reference<void*&>
< true = is_reference<volatile float&>
< false = is_member_object_pointer
< false = is_member_function_pointer
< true = is_member_function_pointer<void (TTA::)(void)>
< true = is_enum
< false = is_enum
< false = is_enum
< true = is_class
< false = is_class
< false = is_function
< false = is_function<void (
)(int)>
< true = is_function<decltype(Print)>
< false = is_function<void (TTA::)(void)>
< true = is_arithmetic
< true = is_arithmetic
< true = is_arithmetic
< false = is_arithmetic
< false = is_arithmetic
< false = is_floating_point
< true = is_floating_point
< true = is_floating_point
< false = is_floating_point
< true = is_object
< true = is_object
< true = is_object
< true = is_object
< true = is_scalar
< true = is_scalar
< false = is_scalar
< true = is_scalar
< false = is_compound
< false = is_compound
< true = is_compound
< true = is_compound
< true = is_member_pointer<void (TTA::
)(void)>
< false = is_member_pointer<void*>
< false = is_const
< true = is_const
< true = is_const
< false = is_volatile
< false = is_volatile
< true = is_volatile
< true = is_pod
< true = is_pod<int[15]>
< true = is_pod
< false = is_pod
< false = is_empty
< true = is_empty
< true = is_empty
< true = has_trivial_constructor
< false = has_trivial_constructor
< true = has_trivial_copy
< false = has_trivial_copy
< true = has_trivial_assign
< false = has_trivial_assign
< true = has_trivial_destructor
< false = has_trivial_destructor
< true = is_signed
< false = is_signed
< true = is_signed
< false = is_unsigned
< true = is_unsigned
< false = is_unsigned
< true = sizeof(char) == alignment_of
< true = sizeof(short) == alignment_of
< true = sizeof(int) == alignment_of
< true = sizeof(void_) == alignment_of<void_>
< true = sizeof(double) == alignment_of
< true = sizeof(char) == alignment_of
< true = 0 == rank
< true = 1 == rank<int[1]>
< true = 2 == rank<int[][2]>
< true = 3 == rank<int[1][2][3]>
< true = 0 == extent
< true = 1 == extent<int[1]>
< true = 1 == extent<int[1][2]>
< true = 2 == extent<int[][2],1>
< true = 1 == extent<int[1][2][3]>
< true = 2 == extent<int[1][2][3],1>
< true = 3 == extent<int[1][2][3],2>
< true = is_same<int,int>
< false = is_same<int,unsigned int>
< false = is_base_of<int,unsigned int>
< true = is_base_of<TTA,TTB>
< false = is_base_of<TTA,Polymorphic>
< true = is_convertible<int,unsigned int>
< true = is_convertible<TTA,TTA>
< false = is_convertible<TTA*,TTB*>
< true = is_convertible<TTB*,TTA*>
< true = is_same<remove_const::type,int>
< false = is_same<remove_const::type,int>
< false = is_same<remove_volatile::type,int>
< false = is_same<remove_volatile::type,int>
< false = is_same<add_const::type,volatile int>
< true = is_same<add_const::type,const volatile int>
< true = is_same<add_volatile::type,volatile int>
< true = is_same<add_volatile::type,const volatile int>
< true = is_same<add_cv::type,const volatile int>
< true = is_same<remove_pointer<int*>::type,int>
< true = is_same<remove_reference<const int&>::type,const int>
< true = is_same<remove_reference<const volatile int&>::type,const volatile int>
< true = is_same<add_pointer::type,int_>
< true = is_same<add_lvalue_reference::type,volatile int&>
< true = is_same<add_rvalue_reference::type,int&&>
< true = is_same<remove_extent::type,int>
< true = is_same<remove_extent<int[2][3]>::type,int[3]>
< true = is_same<remove_extent<int[][3]>::type,int[3]>
< true = is_same<remove_extent<int[3]>::type,int>
< true = is_same<remove_all_extents::type,int>
< true = is_same<remove_all_extents<int[2][3]>::type,int>
< true = is_same<remove_all_extents<int[3]>::type,int>
< false = has_member_function_Function
< true = has_member_function_Function
< false = has_member_function_read
< true = has_member_function_read<vector>
< true = has_static_member_variable_s_var
< false = has_static_member_variable_s_invalid
< aligned_storage<1,1>::type: sizeof 1, alignof 1
< aligned_storage<2,1>::type: sizeof 2, alignof 1
< aligned_storage<2,2>::type: sizeof 2, alignof 2
< aligned_storage<2,4>::type: sizeof 4, alignof 4
< aligned_storage<5,4>::type: sizeof 8, alignof 4
< aligned_storage<16,8>::type: sizeof 16, alignof 8
< aligned_storage<17,16>::type: sizeof 32, alignof 16
make: *_* [bvt/run] Error 1

undefined reference to `_Unwind_Resume'

ok, this is probably not a ustl bug...
Compiling the vector example from the docs gives me the folloeing undefined reference:

g++ -nodefaultlibs -lc test.cpp -L/usr/local/lib -lustl -o test
/tmp/ccUYAka8.o: In function `main':
test.cpp:(.text+0x100): undefined reference to `_Unwind_Resume'
collect2: error: ld returned 1 exit status

Any idea what could be wrong?

Issues with force-inline parameter

Starting from v2.2, I'm experiencing problems with parameter --force-inline usage:

g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -Wextra -Woverloaded-virtual -Wpointer-arith -Wshadow -Wredundant-decls -Wcast-qual -std=c++11  -fPIC -MMD -MT "unew.s .o/unew.o" -o .o/unew.o -c unew.cc
In file included from /usr/include/c++/5.3.1/exception:37:0,
                 from uexception.h:9,
                 from unew.h:7,
                 from unew.cc:6:
/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h:1991:10: error: expected unqualified-id before 'namespace'
   inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
          ^
/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h:1995:10: error: expected unqualified-id before 'namespace'
   inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
          ^
Makefile:48: recipe for target '.o/unew.o' failed
make: *** [.o/unew.o] Error 1

Tried several gcc versions, got the same problem. The output above is for 5.3.1 version.

$ g++ --version
g++ (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
Copyright (C) 2015 Free Software Foundation, Inc.

ustl::ostream do not accept char string

Hello !
The program bellow shows the problem (it works with std):
Cheers !

#define USE_STD2
#ifdef USE_STD
#include <iostream>
#include <sstream>
using namespace std;
#else
#include <ustl.h>
using namespace ustl;
#endif // USE_STD

ostream &addChar(ostream &os)
{
    os << "I'm a char string";
    return os;
}

int main()
{
    ostringstream ss;
    addChar(ss);
    return 0;
}
||=== Build: Release in test (compiler: GNU GCC Compiler) ===|
../../../../../../local/include/ustl/ulimits.h||In instantiation of ‘struct ustl::numeric_limits<char [18]>’:|
../../../../../../local/include/ustl/mostream.h|260|required from ‘ustl::ostream& ustl::operator<<(ustl::ostream&, const T&) [with T = char [18]]’|
main.cpp|13|required from here|
../../../../../../local/include/ustl/ulimits.h|25|error: function returning an array|
../../../../../../local/include/ustl/ulimits.h|26|error: function returning an array|
||=== Build failed: 2 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===|

make check fails ?

Hello !
I'm testing ustl and when I execute "make check" it ends with "make: *** [bvt/run] Error 1" and it seems that the problem is on bvt/Module.mk:

# The correct output of a bvt is stored in bvtXX.std
# When the bvt runs, its output is compared to .std
#
bvt/run:    ${bvt/BVTS}
    @echo "Running build verification tests:"
    @for i in ${bvt/BVTS}; do   \
        BVT="bvt/$$(basename $$i)"; \
        echo "Running $$i";     \
        ./$$i < $$BVT.cc &> $$i.out;    \   <<<<<<< here nothing goes to $$.out , the "&>" should be only ">"  ???
        diff $$BVT.std $$i.out && rm -f $$i.out; \
    done

istrean missing gcount method

Hello !
I'm trying to test ustl with https://github.com/duckduckgo/cpp-libface and noticed that ustl::istream is missing the ustl::istream::gcount() method that is present in std.
Can it be added ?

This method is used mainly when we want limit the length read by get_line:

#define INPUT_LINE_SIZE 256
char buf[INPUT_LINE_SIZE];
is.get_line(buff, INPUT_LINE_SIZE);
streamsize line_length = is.gcount();
if(line_length == -1) done();

istringstream::getline bug ?

Hello !
I'm trying to read a file line by line inside a loop and looking inside istringstream::getline there is a lot o processing that is not optimal to use inside a loop, also it doesn't seem to work properly see demo bellow:

#include <ustl.h>

int main()
{
    ustl::string fname = "test.csv";
    ustl::ifstream fd_in(fname, ustl::ios::in);
    //fd_in.set_delimiters("");
    ustl::fstream fd_out;
    //fd_in.open(fname, ustl::ios::in);
    fd_out.open(fname + "2", ustl::ios::out);

    ustl::string line;
    while( !fd_in.eof() )
    {
        fd_in.getline(line);
        fd_out.write(line, line.size());
        fd_out.write("\n", 1);
    }
    return 0;
}

Here is test.csv:

"id","name"
1,"joe"
2,"mary"

And here the program generated test.csv2 (expected the same as test.csv):
It dequote the ("id") and do not read the first line properly.

id
,"name"
1,"joe"
2,"mary"

Also if I declare ifstream without parameters the progam compiles fine but do not link:
main.cpp:(.text.startup+0x31)||undefined reference to `ustl::ifstream::ifstream()'|

    ustl::ifstream fd_in;
    fd_in.open(fname, ustl::ios::in);

Cheers !

sistream.cc warning with -Wmaybe-uninitialized

Not an issue but a small warning which we can get rid of:

    Compiling mistream.cc ...
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -Wextra -Woverloaded-virtual -Wpointer-arith -Wshadow -Wredundant-decls -Wcast-qual -std=c++14  -I/home/mock/rpmbuild/BUILDROOT/ustl-2.3-1.fc23.denf.x86_64/usr/include -fPIC -MMD -MT "mistream.s .o/mistream.o" -o .o/mistream.o -c mistream.cc
sistream.cc: In member function 'ustl::istringstream& ustl::istringstream::get(char*, ustl::cmemlink::size_type, char)':
sistream.cc:180:8: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]
  *p = c;
        ^

ostream not using friend functions

Hello !
I'm adapting https://github.com/asmodehn/tinythreadpp to use ustl and it works with std but with ustl it's complaining here:

class thread::id {
  public:
    /// Default constructor.
    /// The default constructed ID is that of thread without a thread of
    /// execution.
    id() : mId(0) {};

...
    inline friend ustd::ostream& operator <<(ustd::ostream &os, const id &obj)
    {
      os << obj.mId;
      return os;
    }

  private:
    unsigned long int mId;
};
...
void ThreadIDs(void * aArg)
{
  cout << " My thread id is " << this_thread::get_id() << "." << endl;
}
||=== Build: Release in tinythread (compiler: GNU GCC Compiler) ===|
../../../../local/include/ustl/sostream.h||In instantiation of ‘void ustl::object_text_writer<T>::operator()(ustl::ostringstream&, const T&) const [with T = tthread::thread::id]’:|
../../../../local/include/ustl/sostream.h|136|required from ‘ustl::ostringstream& ustl::operator<<(ustl::ostringstream&, const T&) [with T = tthread::thread::id]’|
/home/mingo/dev/c/cpp/tinythreadpp/main.cpp|61|required from here|
../../../../local/include/ustl/sostream.h|125|error: ‘const class tthread::thread::id’ has no member named ‘text_write’|
||=== Build finished: 1 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===|

It seems that ustl do not try to use "inline friend ustd::ostream& operator <<(ustd::ostream &os, const id &obj)" (somehow do not tell/help the compiler to use it?) any idea about it ?

I can try to create a member named ‘text_write’ but would be nice if ustl accepted the same as std.

Cheers !

Trying to compile ustl with clang 3.7 give several warnings and errors

My Config.mk

################ Build options #######################################

NAME        := ustl
MAJOR       := 2
MINOR       := 2

#DEBUG      := 1
BUILD_SHARED    := 1
BUILD_STATIC    := 1
NOLIBSTDCPP := 1

################ Programs ############################################

CXX     := clang++
LD      := clang++
AR      := ar
RANLIB      := ranlib
DOXYGEN     := doxygen
INSTALL     := install

INSTALLDATA := ${INSTALL} -D -p -m 644
INSTALLLIB  := ${INSTALLDATA}
RMPATH      := rmdir -p --ignore-fail-on-non-empty

################ Destination #########################################

INCDIR      := /home/xxxx/local/include
LIBDIR      := /home/xxxx/local/lib

################ Compiler options ####################################

WARNOPTS    := -Wall -Wextra -Woverloaded-virtual -Wpointer-arith\
        -Wshadow -Wredundant-decls -Wcast-qual
TGTOPTS     := -std=c++11 -march=native -I/home/xxxx/local/include
INLINEOPTS  :=

CXXFLAGS    := ${WARNOPTS} ${TGTOPTS} -fPIC -ffunction-sections -fdata-sections
LDFLAGS     := -L/home/xxxx/local/lib
LIBS        :=
ifdef DEBUG
    CXXFLAGS    += -O0 -g
    LDFLAGS += -rdynamic
else
    CXXFLAGS    += -Os -g0 -DNDEBUG=1 -fomit-frame-pointer ${INLINEOPTS}
    LDFLAGS += -s -Wl,-gc-sections -static-libgcc
endif
ifdef NOLIBSTDCPP
    LD      := clang
    STAL_LIBS   :=
    LIBS    := ${STAL_LIBS}
endif
BUILDDIR    := /tmp/xxxx/make/${NAME}
O       := .o/

slib_lnk    = lib$1.so
slib_son    = lib$1.so.${MAJOR}
slib_tgt    = lib$1.so.${MAJOR}.${MINOR}
slib_flags  = -shared -Wl,-soname=$1

The result of executing make:

    Compiling bktrace.cc ...
In file included from bktrace.cc:6:
In file included from ./bktrace.h:7:
In file included from ./ulimits.h:10:
./uttraits.h:118:19: warning: keyword '__is_void' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_void);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:122:19: warning: keyword '__is_integral' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_integral);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:142:19: warning: keyword '__is_floating_point' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_floating_point);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:156:30: warning: keyword '__is_pointer' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
template <typename T> struct __is_pointer : public false_type {};
                             ^
./uttraits.h:167:19: warning: keyword '__is_member_pointer' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_member_pointer);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:171:19: warning: keyword '__is_member_function_pointer' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_member_function_pointer);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:186:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......)> : public true_type { };
                                                                 ~~~^
./uttraits.h:186:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......)> : public true_type { };
                                                                 ^
./uttraits.h:186:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......)> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:187:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) &> : public true_type { };
                                                                 ~~~^
./uttraits.h:187:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) &> : public true_type { };
                                                                 ^
./uttraits.h:187:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) &> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:188:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) &&> : public true_type { };
                                                                 ~~~^
./uttraits.h:188:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) &&> : public true_type { };
                                                                 ^
./uttraits.h:188:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) &&> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:192:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const> : public true_type { };
                                                                 ~~~^
./uttraits.h:192:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const> : public true_type { };
                                                                 ^
./uttraits.h:192:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:193:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const &> : public true_type { };
                                                                 ~~~^
./uttraits.h:193:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const &> : public true_type { };
                                                                 ^
./uttraits.h:193:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const &> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:194:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const &&> : public true_type { };
                                                                 ~~~^
./uttraits.h:194:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const &&> : public true_type { };
                                                                 ^
./uttraits.h:194:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const &&> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:198:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) volatile> : public true_type { };
                                                                 ~~~^
./uttraits.h:198:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) volatile> : public true_type { };
                                                                 ^
./uttraits.h:198:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) volatile> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:199:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) volatile &> : public true_type { };
                                                                 ~~~^
./uttraits.h:199:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) volatile &> : public true_type { };
                                                                 ^
./uttraits.h:199:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) volatile &> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:200:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) volatile &&> : public true_type { };
                                                                 ~~~^
./uttraits.h:200:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) volatile &&> : public true_type { };
                                                                 ^
./uttraits.h:200:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) volatile &&> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:204:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const volatile> : public true_type { };
                                                                 ~~~^
./uttraits.h:204:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const volatile> : public true_type { };
                                                                 ^
./uttraits.h:204:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const volatile> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:205:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &> : public true_type { };
                                                                 ~~~^
./uttraits.h:205:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &> : public true_type { };
                                                                 ^
./uttraits.h:205:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:206:69: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &&> : public true_type { };
                                                                 ~~~^
./uttraits.h:206:66: note: preceding '...' declares a function parameter pack
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &&> : public true_type { };
                                                                 ^
./uttraits.h:206:69: note: insert ',' before '...' to silence this warning
template <typename R, typename... Args> struct is_function<R(Args......) const volatile &&> : public true_type { };
                                                                    ^
                                                                    , 
./uttraits.h:213:36: warning: '...' in this location creates a C-style varargs function [-Wambiguous-ellipsis]
struct __is_referenceable<R(Args......)> : public true_type {};
                                ~~~^
./uttraits.h:213:33: note: preceding '...' declares a function parameter pack
struct __is_referenceable<R(Args......)> : public true_type {};
                                ^
./uttraits.h:213:36: note: insert ',' before '...' to silence this warning
struct __is_referenceable<R(Args......)> : public true_type {};
                                   ^
                                   , 
./uttraits.h:259:19: warning: keyword '__is_signed' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
UNARY_TRAIT_DEFN (__is_signed);
                  ^
./uttraits.h:38:30: note: expanded from macro 'UNARY_TRAIT_DEFN'
template <typename T> struct name : public false_type {}
                             ^
./uttraits.h:296:1: error: declaration of anonymous class must be a definition
class __is_convertible : public integral_constant<bool, is_void<T>::value> {};
^
./uttraits.h:296:57: error: missing 'typename' prior to dependent type name 'is_void<T>::value'
class __is_convertible : public integral_constant<bool, is_void<T>::value> {};
                                                        ^~~~~~~~~~~~~~~~~
                                                        typename 
./uttraits.h:296:74: error: expected unqualified-id
class __is_convertible : public integral_constant<bool, is_void<T>::value> {};
                                                                         ^
./uttraits.h:298:1: error: declaration of anonymous class must be a definition
class __is_convertible<F, T, false> {
^
./uttraits.h:298:28: error: expected unqualified-id
class __is_convertible<F, T, false> {
                           ^
./uttraits.h:307:32: error: expected class name
struct is_convertible : public __is_convertible<F, T>::type {};
                               ^
./uttraits.h:307:53: error: expected '{' after base class list
struct is_convertible : public __is_convertible<F, T>::type {};
                                                    ^
./uttraits.h:307:53: error: expected ';' after struct
struct is_convertible : public __is_convertible<F, T>::type {};
                                                    ^
                                                    ;
./uttraits.h:307:53: error: expected unqualified-id
In file included from bktrace.cc:7:
In file included from ./sostream.h:7:
In file included from ./ustring.h:7:
In file included from ./memblock.h:7:
In file included from ./memlink.h:7:
In file included from ./cmemlink.h:7:
In file included from ./ualgobase.h:7:
./uutility.h:156:83: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
template <typename T, bool IsSigned> struct __is_negative { inline constexpr bool operator()(const T& v) { return v < 0; } };
                                                                                  ^
                                                                                                         const
./uutility.h:157:77: warning: 'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Wconstexpr-not-const]
template <typename T> struct __is_negative<T,false> { inline constexpr bool operator()(const T&) { return false; } };
                                                                            ^
                                                                                                 const
In file included from bktrace.cc:7:
In file included from ./sostream.h:7:
In file included from ./ustring.h:7:
In file included from ./memblock.h:7:
In file included from ./memlink.h:8:
In file included from ./ualgo.h:9:
In file included from ./umemory.h:7:
./unew.h:28:1: warning: replacement function 'operator new' cannot be declared 'inline' [-Winline-new-delete]
inline void* operator new (size_t n) throw (std::bad_alloc)     { return tmalloc (n); }
^
./unew.h:29:1: warning: replacement function 'operator new[]' cannot be declared 'inline' [-Winline-new-delete]
inline void* operator new[] (size_t n) throw (std::bad_alloc)   { return tmalloc (n); }
^
./unew.h:30:1: warning: replacement function 'operator delete' cannot be declared 'inline' [-Winline-new-delete]
inline void  operator delete (void* p)                          { nfree (p); }
^
./unew.h:30:14: warning: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Wimplicit-exception-spec-mismatch]
inline void  operator delete (void* p)                          { nfree (p); }
             ^
./unew.h:31:1: warning: replacement function 'operator delete[]' cannot be declared 'inline' [-Winline-new-delete]
inline void  operator delete[] (void* p)                        { nfree (p); }
^
./unew.h:31:14: warning: function previously declared with an explicit exception specification redeclared with an implicit exception specification [-Wimplicit-exception-spec-mismatch]
inline void  operator delete[] (void* p)                        { nfree (p); }
             ^
In file included from bktrace.cc:7:
In file included from ./sostream.h:7:
In file included from ./ustring.h:8:
./utf8.h:184:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
        register wchar_t shift = nBytes * 6;
        ^~~~~~~~~
In file included from bktrace.cc:7:
./sostream.h:163:3: error: default initialization of an object of const type 'const struct Sendl' without a user-provided default constructor
} endl;
  ^
      {}
./sostream.h:168:3: error: default initialization of an object of const type 'const struct Sflush' without a user-provided default constructor
} flush;
  ^
       {}
29 warnings and 11 errors generated.
make: *** [.o/bktrace.o] Error 1

ustl::size_t and ustl::ptrdiff_t missing

I replace libstdc++ with libustl and wrap ustl into the std namespace.
This causes errors because for some application that use std::size_t nd std::ptrdiff_t.

That's why it would be nice to have ustl::size_t and ustl::ptrdiff_t defined using the (identical) c definition.

missing functionality in unique_ptr/shared_ptr

Hi

I am missing the deleter options for the smart pointers you provide.
Real world applications requires both unique_ptr and shared_ptr to implement deleter functionality to actually work.
having deleters will allow you to add unique_ptr(unique_ptr&&) constructor + dynamic_pointer_cast/static_pointer_cast/etc..

It is way harder to actually use ustl with complex code using smart pointers.

I'm also missing the operator==(nullptr_t, *_ptr) functions..

Thank you!

iostream support

I am trying to migrate a large existing project to uSTL, and it uses iostreams. It seems that uSTL only supports input or output streams, but not both.

A quick look at the GNU STL seems to imply it is very straightforward: simply have the two "halves" point to the same underlying basic_streambuf, but uSTL doesn't have that buffer abstraction layer, so I wasn't able to quickly piece one together with my limited understanding of the uSTL internals.

Is this something that is intentionally left out? Is there a rough equivalent already available? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.