diff --git a/include/boost/regex/concepts.hpp b/include/boost/regex/concepts.hpp index e974d699..b9b3e90f 100644 --- a/include/boost/regex/concepts.hpp +++ b/include/boost/regex/concepts.hpp @@ -99,27 +99,27 @@ public: typedef allocator_architype other; }; - pointer address(reference r); - const_pointer address(const_reference r); - pointer allocate(size_type); - pointer allocate(size_type, pointer); - void deallocate(pointer, size_type); - size_type max_size()const; + pointer address(reference r){ return &r; } + const_pointer address(const_reference r) { return &r; } + pointer allocate(size_type n) { return static_cast(std::malloc(n)); } + pointer allocate(size_type, pointer) { return static_cast(std::malloc(n)); } + void deallocate(pointer p, size_type) { std::free(p); } + size_type max_size()const { return UINT_MAX; } - allocator_architype(); - allocator_architype(const allocator_architype&); + allocator_architype(){} + allocator_architype(const allocator_architype&){} template - allocator_architype(const allocator_architype&); + allocator_architype(const allocator_architype&){} - void construct(pointer, const_reference); - void destroy(pointer); + void construct(pointer p, const_reference r) { new (p)T(r); } + void destroy(pointer p) { p->~T(); } }; template -bool operator == (const allocator_architype&, const allocator_architype&); +bool operator == (const allocator_architype&, const allocator_architype&) {return true; } template -bool operator != (const allocator_architype&, const allocator_architype&); +bool operator != (const allocator_architype&, const allocator_architype&) { return false; } namespace boost{ // @@ -130,7 +130,7 @@ template struct regex_traits_architype { public: - regex_traits_architype(); + regex_traits_architype(){} typedef charT char_type; // typedef std::size_t size_type; typedef std::vector string_type; @@ -168,8 +168,8 @@ public: private: // this type is not copyable: - regex_traits_architype(const regex_traits_architype&); - regex_traits_architype& operator=(const regex_traits_architype&); + regex_traits_architype(const regex_traits_architype&){} + regex_traits_architype& operator=(const regex_traits_architype&){ return *this; } }; //