[Groonga-commit] groonga/grnxx [master] Don't use constexpr with anonymous union.

Back to archive index

susumu.yata null+****@clear*****
Mon Dec 10 12:59:37 JST 2012


susumu.yata	2012-12-10 12:59:37 +0900 (Mon, 10 Dec 2012)

  New Revision: 23ec39001d05268bb4b1e99ec2294927c7c343ce
  https://github.com/groonga/grnxx/commit/23ec39001d05268bb4b1e99ec2294927c7c343ce

  Log:
    Don't use constexpr with anonymous union.
    
    Due to gcc bugs.

  Modified files:
    lib/alpha/blob_vector.hpp
    lib/error.hpp

  Modified: lib/alpha/blob_vector.hpp (+2 -2)
===================================================================
--- lib/alpha/blob_vector.hpp    2012-12-10 12:32:54 +0900 (63c8148)
+++ lib/alpha/blob_vector.hpp    2012-12-10 12:59:37 +0900 (5820840)
@@ -199,9 +199,9 @@ const uint8_t BLOB_VECTOR_CELL_FLAGS_MASK = 0xF0;
 
 class BlobVectorCell {
  public:
-  constexpr BlobVectorCell() : qword_(0) {}
+  BlobVectorCell() : qword_(0) {}
 
-  static constexpr BlobVectorCell null_value_cell() {
+  static BlobVectorCell null_value_cell() {
     return BlobVectorCell();
   }
   static BlobVectorCell small_value_cell(const void *ptr, uint64_t length) {

  Modified: lib/error.hpp (+7 -7)
===================================================================
--- lib/error.hpp    2012-12-10 12:32:54 +0900 (2bab82b)
+++ lib/error.hpp    2012-12-10 12:59:37 +0900 (0787390)
@@ -38,28 +38,28 @@ enum ErrorCode {
 class Error {
  public:
   // For errno.
-  explicit constexpr Error(int error_code)
+  explicit Error(int error_code)
     : type_(POSIX_ERROR), posix_error_(error_code) {}
 #ifdef GRNXX_WINDOWS
   // For DWORD returned by ::GetLastError().
-  explicit constexpr Error(unsigned long error_code)
+  explicit Error(unsigned long error_code)
     : type_(WINDOWS_ERROR), windows_error_(error_code) {}
 #endif  // GRNXX_WINDOWS
-  explicit constexpr Error(ErrorCode error_code)
+  explicit Error(ErrorCode error_code)
     : type_(GRNXX_ERROR), grnxx_error_(error_code) {}
 
-  constexpr ErrorType type() const {
+  ErrorType type() const {
     return type_;
   }
-  constexpr int posix_error() const {
+  int posix_error() const {
     return posix_error_;
   }
 #ifdef GRNXX_WINDOWS
-  constexpr unsigned long windows_error() const {
+  unsigned long windows_error() const {
     return windows_error_;
   }
 #endif  // GRNXX_WINDOWS
-  constexpr ErrorCode grnxx_error() const {
+  ErrorCode grnxx_error() const {
     return grnxx_error_;
   }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index